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

            if (rowsCount > 0)
            {
                MobileSoft.Model.Sys.Tb_Sys_TakePicContractDetail model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.Sys.Tb_Sys_TakePicContractDetail();
                    //model.DetailID=dt.Rows[n]["DetailID"].ToString();
                    if (dt.Rows[n]["CommID"].ToString() != "")
                    {
                        model.CommID = int.Parse(dt.Rows[n]["CommID"].ToString());
                    }
                    model.OrganCode    = dt.Rows[n]["OrganCode"].ToString();
                    model.ContTypeName = dt.Rows[n]["ContTypeName"].ToString();
                    model.ContSign     = dt.Rows[n]["ContSign"].ToString();
                    model.ContName     = dt.Rows[n]["ContName"].ToString();
                    model.CustName     = dt.Rows[n]["CustName"].ToString();
                    if (dt.Rows[n]["ContEndDate"].ToString() != "")
                    {
                        model.ContEndDate = DateTime.Parse(dt.Rows[n]["ContEndDate"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.Sys.Tb_Sys_TakePicContractDetail model)
 {
     dal.Update(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(MobileSoft.Model.Sys.Tb_Sys_TakePicContractDetail model)
 {
     return(dal.Add(model));
 }