示例#1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO> DataTableToList(DataTable dt)
        {
            List <CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO> modelList = new List <CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO();
                    model.PK_DEVICE_MADE_NO  = dt.Rows[n]["PK_DEVICE_MADE_NO"].ToString();
                    model.AVR_DEVICE_ID      = dt.Rows[n]["AVR_DEVICE_ID"].ToString();
                    model.AVR_EQUIP_NAME     = dt.Rows[n]["AVR_EQUIP_NAME"].ToString();
                    model.AVR_EQUIP_MODEL    = dt.Rows[n]["AVR_EQUIP_MODEL"].ToString();
                    model.AVR_EQUIP_PARA     = dt.Rows[n]["AVR_EQUIP_PARA"].ToString();
                    model.AVR_EQUIP_TYPE     = dt.Rows[n]["AVR_EQUIP_TYPE"].ToString();
                    model.AVR_FACTORY        = dt.Rows[n]["AVR_FACTORY"].ToString();
                    model.AVR_EQUIP_CLASS    = dt.Rows[n]["AVR_EQUIP_CLASS"].ToString();
                    model.AVR_EQUIP_STANDARD = dt.Rows[n]["AVR_EQUIP_STANDARD"].ToString();
                    model.LNG_BENCH_NUM      = dt.Rows[n]["LNG_BENCH_NUM"].ToString();


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(CLDC_Dispatcher.Model.DSPTCH_EQUIP_INFO model)
 {
     dal.Add(model);
 }