Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL();
                    if (dt.Rows[n]["SID"].ToString() != "")
                    {
                        model.SID = int.Parse(dt.Rows[n]["SID"].ToString());
                    }
                    model.SignatureType = dt.Rows[n]["SignatureType"].ToString();
                    if (dt.Rows[n]["FileListID"].ToString() != "")
                    {
                        model.FileListID = int.Parse(dt.Rows[n]["FileListID"].ToString());
                    }
                    if (dt.Rows[n]["SignatureCount"].ToString() != "")
                    {
                        model.SignatureCount = int.Parse(dt.Rows[n]["SignatureCount"].ToString());
                    }
                    if (dt.Rows[n]["OrderIndex"].ToString() != "")
                    {
                        model.OrderIndex = int.Parse(dt.Rows[n]["OrderIndex"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(DigiPower.Onlinecol.Standard.Model.T_FileList_SignatureTmp_MDL model)
 {
     return(dal.Update(model));
 }