`
alovejun14
  • 浏览: 77864 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论
文章列表

Excel

        private void btnCellWrite_Click(object sender, EventArgs e)        {            string path = @"D:\MyWork\myself\CMC9\Grouting2008\Output\XOffice\OursNET.XOffice.XOffice2007.dll";            Assembly assm = Assembly.LoadFile(path);            IXExcel excel = (IXExcel)assm.CreateInst ...
    class Program    {        static void Main(string[] args)        {            Console.WriteLine("线程已开启:");            Thread workerThread = new Thread(new ThreadStart(WorkerMethod));            workerThread.Start();        }         static void WorkerMethod()        {            for (i ...
先看看ASP.NET页面刷新的实现方法: 第一: C# code <!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->private void Button1_Click( object sender, System.EventArgs e ) { Response.Redirect( Request.Url.ToString( ) ); } 第二: C# code ...
第一天:System.DateTime.Now.ToString("yyyy-MM")+"-01" 最后一天:Convert.ToDateTime(System.DateTime.Now.ToString("yyyy-MM-01")).AddMonths(1).AddDays(-1).ToString("yyyy-MM-dd")
注意:Silverlight目前只支持png和jpg格式的图片。        设置背景图片很简单,使用ImageBrush即可。如下:   <Border HorizontalAlignment="Left" Margin="10,8,0,5">    <Border.Background>         <ImageBrush ImageSource="/images/e.png" Stretch="Fill"></ImageBrush>     </ ...
        /// <summary>        /// 根据年份与月份获取天数        /// </summary>        /// <param name="year">年份</param>        /// <param name="month">月份</param>        /// <returns>当月的天数</returns>        private int GetDayNumber(int year, int m ...

Linq模糊查询

// Linq模糊查询//n.Name.StartsWith(Name)--相当于A%//n.Name.EndsWith(Name)  --相当于%A//n.Name.IndexOf(Name)!=-1 --相当于%A% var listWhere = list.Where(n=>n.Name.StartsWith(Name)||n.Name.EndsWith(Name)||n.Name.IndexOf(Name)!=-1); 或 var listWhere = list.Where(n=>n.Name.Contains(Name));

表格样式

<style type="text/css">.warp_table {border-collapse:collapse; width:550px; border:1px solid #4d9ab0}.warp_table td {border:1px solid #4d9ab0}</style>

jQuery HashTable

jQuery.Hashtable = function() { 02     this.items = new Array(); 03     this.itemsCount = 0; 04     this.add = function(key, value) { 05         if (!this.containsKey(key)) { 06             this.items[key] = value; 07
var People=function(){};   $.extend(People.prototype,{            say:function(){alert(1);}      } );   var p=new People();    p.say();
Javascript刷新页面的几种方法:1    history.go(0) 2    location.reload() 3    location=location 4    location.assign(location) 5    document.execCommand('Refresh') 6    window.navigate(location) 7    location.replace(location) 8    document.URL=location.href 
1.收集时,将CheckBoxList里选中的项转换成字符串,并用“,”隔开这里只要调用方法GetChecked(CheckBoxList checkList, string separator)就可以获取到想要的数据。然后存入数据库。 2.显示时,先从库里获取爱好的数据(刚刚用“,”隔开的字符串), 然后调用方法SetChecked(CheckBoxList checkList,string selval,string separator)就可以将库里的数据用CheckBoxList的形式表现出来 ......方法的使用: //这里获取CheckBoxList中的选中项并用",& ...
<span style="cursor:*">文本或其它页面元素</span> 把 * 换成如下15个效果的一种: 下面是对这15种效果的解释。移动鼠标到解释上面,看看你的鼠标起了什么变化吧!hand是手型pointer也是手型,这里推荐使用这种,因为这可以在多种浏览器下使用。crosshair是十字型text是移动到文本上的那种效果wait是等待的那种效果default是默认效果help是问号e-resize是向右的箭头ne-resize是向右上的箭头n-resize是向上的箭头nw-resize是向左上的箭头w-resize是向左的箭头sw-re ...
Insert/Update/Delete操作 插入(Insert) 1.简单形式 说明:new一个对象,使用InsertOnSubmit方法将其加入到对应的集合中,使用SubmitChanges()提交到数据库。 NorthwindDataContext db = new NorthwindDataContext(); var newCustomer = new Customer { CustomerID = "MCSFT", CompanyName = "Microsoft", ContactName = &qu ...
DataGridView导出数据到Excel中,可以导出当前页和全部数据: Code<!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--> 1  #region SaveDataGireViewtoExcel 2         public bool SaveDataGireViewtoExcel() 3     ...
Global site tag (gtag.js) - Google Analytics