Beispiel #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL model)
 {
     return(dal.Add(model));
 }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL model)
 {
     dal.Update(model);
 }
Beispiel #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL> DataTableToList(DataTable dt)
        {
            List <DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL> modelList = new List <DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DigiPower.Onlinecol.Standard.Model.T_ReadyCheckBook_MDL();
                    if (dt.Rows[n]["ReadyCheckBookID"].ToString() != "")
                    {
                        model.ReadyCheckBookID = int.Parse(dt.Rows[n]["ReadyCheckBookID"].ToString());
                    }
                    if (dt.Rows[n]["SingleProjectID"].ToString() != "")
                    {
                        model.SingleProjectID = int.Parse(dt.Rows[n]["SingleProjectID"].ToString());
                    }
                    model.CodeType           = dt.Rows[n]["CodeType"].ToString();
                    model.ReadyCheckBookCode = dt.Rows[n]["ReadyCheckBookCode"].ToString();
                    if (dt.Rows[n]["BeginDate"].ToString() != "")
                    {
                        model.BeginDate = DateTime.Parse(dt.Rows[n]["BeginDate"].ToString());
                    }
                    if (dt.Rows[n]["EndDate"].ToString() != "")
                    {
                        model.EndDate = DateTime.Parse(dt.Rows[n]["EndDate"].ToString());
                    }
                    if (dt.Rows[n]["CreateUserID"].ToString() != "")
                    {
                        model.CreateUserID = int.Parse(dt.Rows[n]["CreateUserID"].ToString());
                    }
                    if (dt.Rows[n]["CreateTime"].ToString() != "")
                    {
                        model.CreateTime = DateTime.Parse(dt.Rows[n]["CreateTime"].ToString());
                    }



                    if (dt.Rows[n]["TOTAL_SCROLL"].ToString() != "")
                    {
                        model.TOTAL_SCROLL = int.Parse(dt.Rows[n]["TOTAL_SCROLL"].ToString());
                    }
                    if (dt.Rows[n]["CHARACTER_SCROLL"].ToString() != "")
                    {
                        model.CHARACTER_SCROLL = int.Parse(dt.Rows[n]["CHARACTER_SCROLL"].ToString());
                    }
                    if (dt.Rows[n]["PIC_SCROLL"].ToString() != "")
                    {
                        model.PIC_SCROLL = int.Parse(dt.Rows[n]["PIC_SCROLL"].ToString());
                    }
                    if (dt.Rows[n]["PIC_PAGE_COUNT"].ToString() != "")
                    {
                        model.PIC_PAGE_COUNT = int.Parse(dt.Rows[n]["PIC_PAGE_COUNT"].ToString());
                    }
                    if (dt.Rows[n]["PHOTO_COUNT"].ToString() != "")
                    {
                        model.PHOTO_COUNT = int.Parse(dt.Rows[n]["PHOTO_COUNT"].ToString());
                    }
                    if (dt.Rows[n]["RADIO_COUNT"].ToString() != "")
                    {
                        model.RADIO_COUNT = int.Parse(dt.Rows[n]["RADIO_COUNT"].ToString());
                    }

                    model.OTHER_MATERIAL = dt.Rows[n]["OTHER_MATERIAL"].ToString();

                    if (dt.Rows[n]["Directory_SCROLL"].ToString() != "")
                    {
                        model.Directory_SCROLL = int.Parse(dt.Rows[n]["Directory_SCROLL"].ToString());
                    }
                    if (dt.Rows[n]["Directory_PAGE_COUNT"].ToString() != "")
                    {
                        model.Directory_PAGE_COUNT = int.Parse(dt.Rows[n]["Directory_PAGE_COUNT"].ToString());
                    }


                    if (dt.Rows[n]["zljddw"].ToString() != "")
                    {
                        model.zljddw = dt.Rows[n]["zljddw"].ToString();
                    }
                    if (dt.Rows[n]["ArchiveUserName"].ToString() != "")
                    {
                        model.ArchiveUserName = dt.Rows[n]["ArchiveUserName"].ToString();
                    }
                    if (dt.Rows[n]["ArchiveUser_Tel"].ToString() != "")
                    {
                        model.ArchiveUser_Tel = dt.Rows[n]["ArchiveUser_Tel"].ToString();
                    }
                    if (dt.Rows[n]["jsdwfzr_Name"].ToString() != "")
                    {
                        model.jsdwfzr_Name = dt.Rows[n]["jsdwfzr_Name"].ToString();
                    }
                    if (dt.Rows[n]["jsdwfzr_Tel"].ToString() != "")
                    {
                        model.jsdwfzr_Tel = dt.Rows[n]["jsdwfzr_Tel"].ToString();
                    }
                    if (dt.Rows[n]["cscd"].ToString() != "")
                    {
                        model.cscd = dt.Rows[n]["cscd"].ToString();
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }