Ejemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct> modelList = new List <MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model             = new MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct();
                    model.AdjunctCode = dt.Rows[n]["AdjunctCode"].ToString();
                    if (dt.Rows[n]["MessageCode"].ToString() != "")
                    {
                        model.MessageCode = new Guid(dt.Rows[n]["MessageCode"].ToString());
                    }
                    model.AdjunctName = dt.Rows[n]["AdjunctName"].ToString();
                    model.FilPath     = dt.Rows[n]["FilPath"].ToString();
                    model.FileName    = dt.Rows[n]["FileName"].ToString();
                    model.FileExName  = dt.Rows[n]["FileExName"].ToString();
                    if (dt.Rows[n]["FileSize"].ToString() != "")
                    {
                        model.FileSize = decimal.Parse(dt.Rows[n]["FileSize"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct model)
 {
     dal.Update(model);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.SQMSys.Tb_Sys_MessageAdjunct model)
 {
     dal.Add(model);
 }