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

            if (rowsCount > 0)
            {
                MobileSoft.Model.System.Tb_System_Config model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model             = new MobileSoft.Model.System.Tb_System_Config();
                    model.ConfigKey   = dt.Rows[n]["ConfigKey"].ToString();
                    model.ConfigName  = dt.Rows[n]["ConfigName"].ToString();
                    model.ConfigValue = dt.Rows[n]["ConfigValue"].ToString();
                    model.Memo        = dt.Rows[n]["Memo"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.System.Tb_System_Config model)
 {
     dal.Update(model);
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.System.Tb_System_Config model)
 {
     dal.Add(model);
 }