摘要: /// <summary> /// 复制或剪切文件到剪切板 /// </summary> /// <param name="files">文件路径数组</param> /// <param name="cut">true:剪切;false:复制</param> public static void CopyToClipboard(string[] files, bool cut) { if (files == null) return; IDataObject dat... 阅读全文
posted @ 2012-11-27 14:06 红鲤鱼与驴与绿鲤鱼 阅读(2887) 评论(0) 推荐(0)
摘要: using System.IO;/// <summary>/// 获取指定目录下的所有文件和文件夹大小/// </summary>/// <param name="path">目录路径</param>/// <returns>string,返回所有文件夹名字</returns>protected long GetDirectorySize(string path){ long dirSize = 0; DirectoryInfo dir = new DirectoryInfo(path); foreac 阅读全文
posted @ 2012-05-14 13:54 红鲤鱼与驴与绿鲤鱼 阅读(707) 评论(0) 推荐(0)
摘要: SELECT * FROM gCms_IndicatorFirm WHERE datediff(month,[PostDate],getdate())=0 阅读全文
posted @ 2012-02-20 14:32 红鲤鱼与驴与绿鲤鱼 阅读(190) 评论(1) 推荐(0)
摘要: void objTimer_Elapsed(object sender, ElapsedEventArgs e) { GlenetCms.UI.GetInfo.InsertInfo(); } void Application_Start(object sender, EventArgs e) { //在应用程序启动时运行的代码 System.Timers.Timer timer = new System.Timers.Timer(1000 * 3600);//执行间隔时间,单位为毫秒 ... 阅读全文
posted @ 2012-01-11 16:30 红鲤鱼与驴与绿鲤鱼 阅读(273) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取整个页面内容 /// </summary> /// <param name="url"></param> /// <returns></returns> public static string GetPage(string url,string type) { HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url); HttpWebResponse ... 阅读全文
posted @ 2012-01-11 15:32 红鲤鱼与驴与绿鲤鱼 阅读(212) 评论(0) 推荐(0)
摘要: /// <summary> /// 获取字符串中指定字符间的字符串 /// </summary> /// <param name="str">要截取的字符串</param> /// <param name="start">开始字符串</param> /// <param name="last">结束字符串</param> /// <param name="n">类型</param> /// < 阅读全文
posted @ 2012-01-11 15:31 红鲤鱼与驴与绿鲤鱼 阅读(1266) 评论(0) 推荐(0)
摘要: protected System.Drawing.Image ReturnImage(string strPhotoPath) { FileStream fstream = new FileStream(strPhotoPath, FileMode.OpenOrCreate, FileAccess.Read); byte[] byData = new byte[fstream.Length]; fstream.Read(byData, 0, System.Convert.ToInt32(fstream.Lengt... 阅读全文
posted @ 2011-11-02 14:58 红鲤鱼与驴与绿鲤鱼 阅读(346) 评论(0) 推荐(0)
摘要: function RefreshPage(id) { parent.document.getElementById(id).click();}弹出框关闭后调用的方法id为父页面button的id<input type="button" style="display:none" id="duoduo" name="duoduo" onclick="document.execCommand('refresh',false,0)" /> 阅读全文
posted @ 2011-10-17 11:23 红鲤鱼与驴与绿鲤鱼 阅读(293) 评论(0) 推荐(0)
摘要: DirectoryInfo dinfo = new DirectoryInfo(Server.MapPath("~/etao/item/")); FileInfo[] files = dinfo.GetFiles("*.xml"); //读取item文件夹下所有文件名 FileInfo file = new FileInfo(Server.MapPath("~/etao/FullIndex.xml")); XmlTextWriter textWriter = new XmlTextWriter(Server.MapPath(" 阅读全文
posted @ 2011-07-11 15:32 红鲤鱼与驴与绿鲤鱼 阅读(1004) 评论(0) 推荐(0)
摘要: /// <summary> /// 删除商品xml提交动作 /// </summary> /// <param name="ids">id集合</param> public void etao_delProductXml(string ids) { XmlDocument doc1 = new XmlDocument(); doc1.Load(Server.MapPath("~/etao/IncrementIndex.xml")); XmlNodeList nodes1 = doc1.GetElements 阅读全文
posted @ 2011-07-04 10:39 红鲤鱼与驴与绿鲤鱼 阅读(210) 评论(0) 推荐(0)