C# ͼƬ²Ã¼ô
/// <summary>
/// ËõС²Ã¼ôͼƬ
/// </summary>
/// <param name="int_Width">ÒªËõС²Ã¼ôͼƬ¿í¶È</param>
/// <param name="int_Height">ÒªËõС²Ã¼ôͼƬ³¤¶È</param>
/// <param name="input_ImgUrl">Òª´¦ÀíͼƬ·¾¶</param>
/// <param name="out_ImgUrl">´¦ÀíÍê±ÏͼƬ·¾¶</param>
public void ImgReduceCutOut(int int_Width, int int_Height, string input_ImgUrl, string out_ImgUrl)
{
// £½£½£½ÉÏ´«±ê׼ͼ´óС£½£½£½
int int_Standard_Width = 160;
int int_Standard_Height = 160;
int Reduce_Width = 0; // ËõСµÄ¿í¶È
int Reduce_Height = 0; // ËõСµÄ¸ß¶È
int CutOut_Width = 0; // ²Ã¼ôµÄ¿í¶È
int CutOut_Height = 0; // ²Ã¼ôµÄ¸ß¶È
int level = 100; //ËõÂÔͼµÄÖÊÁ¿ 1-100µÄ·¶Î§
// £½£½£½»ñµÃËõС£¬²Ã¼ô´óС£½£½£½
if (int_Standard_Height * int_Width / int_Standard_Width > int_Height)
{
Reduce_Width = int_Width;
Reduce_Height = int_Standard_Height * int_Width / int_Standard_Width;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else if (int_Standard_Height * int_Width / int_Standard_Width < int_Height)
{
Reduce_Width = int_Standard_Width * int_Height / int_Standard_Height;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
else
{
Reduce_Width = int_Width;
Reduce_Height = int_Height;
CutOut_Width = int_Width;
CutOut_Height = int_Height;
}
// £½£½£½Í¨¹ýÁ¬½Ó´´½¨Image¶ÔÏó£½£½£½
System.Drawing.Image oldimage = System.Drawing.Image.fromFile(Server.MapPath(input_ImgUrl));
Ïà¹ØÎĵµ£º
ºÅ³ÆxmlhelperµÄÒ»¸öÀà
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
/// </summary>
public class XMLHelper
{
public X ......
MSSQL:
declare @begin datetime
declare @End datetime
set @begin=getdate()
--Ö´ÐеÄÓï¾äдÔÚÕâÀï
set @End=getdate()
select datediff(millisecond,@begin,@End) as Ö´ÐеÄʱ¼ä
--millisecond±íʾºÁÃë Èç¹û¿´Ãë¿ÉÒÔʹÓÃss
C#:
ºÜ¶àʱº ......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml;
namespace WebApplication2
{
/// <summary>
/// XMLHelper XMLÎĵµ²Ù×÷¹ÜÀíÆ÷
&nb ......
µÚÒ»ÖÖ
<%=RetInfo("DB","Êý¾Ý¿â") %>
<%=RetInfo("YX_UpFile","ÉÏ´«Îļþ") %>
<%=RetfileInfo("Include/", "¹ã¸æ")%>
//´Óǰ̨µ÷Óúǫ́·½·¨
//´Óǰ̨µ÷Óúǫ́µÄ·½·¨..²¢ÏòÆä·½·¨´«È벻ͬµÄ²ÎÊý!
µÚ¶þÖÖ
<ItemTemplate >
<%#Ret_stat(Convert.ToInt16(Eval("YX_Stat1")), "Èȵã")%>
......