摘要:例子是IQCFeedstockRecordModify.cs 前端代码 <cimesui:cimesgridview width="100%" id="gvShow" runat="server" allowpaging="true" autogeneratecolumns="false" page
        
阅读全文
 
        
            
            
摘要:例如想取 same的值: list[1].GetType().GetProperty("same").GetValue(list[1],null).ToString()//也可以循环list for (int i = 0; i < list.Count; i++) { string a = list
        
阅读全文
 
        
            
            
摘要:只需要加上这段代码: style="margin: 0px auto;" 例: <cimesui:cimesgridview id="gvshow" runat="server" autogeneratecolumns="false" style="margin: 0px auto;" allowp
        
阅读全文
 
        
            
            
摘要://声明 public class DicDeviceOperationList { public string sameDevice { get; set; } public string sameOperation { get; set; } public string strSid { get
        
阅读全文
 
        
            
            
摘要:/// <summary> /// Convert list to Data Table /// </summary> /// <typeparam name="T">Target Class</typeparam> /// <param name="varlist">list you want t
        
阅读全文
 
        
            
            
摘要://dtData是datatable var InputList = dtData.AsEnumerable().Select( p => new { Device = p["DEVICE"].ToString().Trim(), Operation = p["OPERATION"].ToStrin
        
阅读全文
 
        
            
            
摘要:1、先定一个DataTable private DataTable dtComp { get { return this["dtComp"] as DataTable; } set { this["dtComp"] = value; } } 2、创建datatable的行 dtComp = new 
        
阅读全文
 
        
            
            
摘要:int aaaa = 9; int bbb = 5; bbb = 5; aaaa -= bbb; //这里的运算结果 aaa = 4
        
阅读全文
 
        
            
            
摘要:索引器和迭代器 索引器 用来说这种集合它里面的值是可以被索引的,你给我一个索引,我就能拿这个索引给你找到这个值。 并不是说每一种集合或者每一种数据结构都有索引器 迭代器 你给我一个集合,我拿着迭代器就能够保证把集合里的每一个元素都能给你遍历一遍,或者说从头到尾遍历一遍。即迭代器就是保证你可以用它把全
        
阅读全文
 
        
            
            
摘要:list1.Exists(e => e >= 500) 查询list1里面有没有元素是大于或等于500的(只要有1个元素满足大于500就返回true), 这里返回false,因为没有大于500的 也可以把第十一行的语句改为: (list1)=> {if (x > 500) return true;r
        
阅读全文
 
        
            
            
摘要:public enum LogLevel { Debug=0, Error=1, Fatal=2, Info=3, Warn=4 } switch (level) { case LogLevel.Debug: logInstance.Debug(message); break; case LogLe
        
阅读全文
 
        
            
            
摘要:按照步骤来即可 (本次代码:AlterBatchID) 1、先定义一个List //AlterBatch名字随便定义 private List<AlterBatch> _list { get { return this["_list"] as List<AlterBatch>; } set { th
        
阅读全文
 
        
            
            
摘要://获取当前登录用户 User.Identity.Name //取消进站的API WIPTransaction.UndoLotCheckIn(lot, "Wait", true, txnStamp); //切换到110数据库 //第一种方法 using (var cts = CimesTransac
        
阅读全文
 
        
            
            
摘要://当前页面连接的是170数据库,切换到176数据库 CustomDataAgent dataAgent = DBCenter.Create(Utility.AppSetting.WMSConnection); //查询176数据库的MES_AOI_WO表 string sqlAOIWO = @"S
        
阅读全文
 
        
            
            
摘要://先给第14行第0列的单元格赋值 sheet2.CreateRow(14).CreateCell(0).SetCellValue("PS:根据‘测试数据报表’中‘FM’项统计不良比例"); IFont font3 = wookbook1.CreateFont(); font3.Color = HS
        
阅读全文
 
        
            
            
摘要:IWorkbook wookbook1; ISheet sheet2 = wookbook1.CreateSheet("数据统计报表"); for (int j = 1; j < 11; j++) { //如果没有创建行,那么下一行的GetRow就要变成CreateRow //如果已经创建了行,就用
        
阅读全文
 
        
            
            
摘要:代码如下 //往cob_class里面添加默认选项,cob_class是combobox控件的名称 ArrayList arrayListclass = new ArrayList(); arrayListclass.Add("请选择"); arrayListclass.Add("光器件一课"); 
        
阅读全文
 
        
            
            
摘要:double[] Array= new double[1,2,3]; 清空Array数组 Array= new double[3];
        
阅读全文
 
        
            
            
摘要://tb 就是触发了 OnTextChanged 事件的 textbox 控件 TextBox tb = sender as TextBox; //if就是判断 ,假设触发事件的是 tb_practical_trust1 控件时,该进行什么操作 if (tb.ID == "tb_practical_
        
阅读全文