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

            if (rowsCount > 0)
            {
                CLDC_Dispatcher.Model.DSPTCH_SCHEME model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new CLDC_Dispatcher.Model.DSPTCH_SCHEME();
                    model.AVR_SCHEME_ID   = dt.Rows[n]["AVR_SCHEME_ID"].ToString();
                    model.AVR_SCHEME_NAME = dt.Rows[n]["AVR_SCHEME_NAME"].ToString();
                    model.AVR_CHECK_NO    = dt.Rows[n]["AVR_CHECK_NO"].ToString();


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