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

            if (rowsCount > 0)
            {
                Hownet.Model.PayMain model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Hownet.Model.PayMain();
                    if (dt.Rows[n]["ID"].ToString() != "")
                    {
                        model.ID = int.Parse(dt.Rows[n]["ID"].ToString());
                    }
                    if (dt.Rows[n]["DateTime"].ToString() != "")
                    {
                        model.DateTime = DateTime.Parse(dt.Rows[n]["DateTime"].ToString());
                    }
                    if (dt.Rows[n]["BegingDate"].ToString() != "")
                    {
                        model.BegingDate = DateTime.Parse(dt.Rows[n]["BegingDate"].ToString());
                    }
                    if (dt.Rows[n]["EndDate"].ToString() != "")
                    {
                        model.EndDate = DateTime.Parse(dt.Rows[n]["EndDate"].ToString());
                    }
                    if (dt.Rows[n]["Indexs"].ToString() != "")
                    {
                        model.Indexs = int.Parse(dt.Rows[n]["Indexs"].ToString());
                    }
                    if (dt.Rows[n]["IsVerify"].ToString() != "")
                    {
                        model.IsVerify = int.Parse(dt.Rows[n]["IsVerify"].ToString());
                    }
                    if (dt.Rows[n]["VerifyMan"].ToString() != "")
                    {
                        model.VerifyMan = int.Parse(dt.Rows[n]["VerifyMan"].ToString());
                    }
                    if (dt.Rows[n]["VerifyDateTime"].ToString() != "")
                    {
                        model.VerifyDateTime = DateTime.Parse(dt.Rows[n]["VerifyDateTime"].ToString());
                    }
                    if (dt.Rows[n]["CaicType"].ToString() != "")
                    {
                        model.CaicType = int.Parse(dt.Rows[n]["CaicType"].ToString());
                    }
                    else
                    {
                        model.CaicType = 0;
                    }
                    if (dt.Rows[n]["Posting"] != null && dt.Rows[n]["Posting"].ToString() != "")
                    {
                        model.Posting = int.Parse(dt.Rows[n]["Posting"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新审核
 /// </summary>
 /// <param name="model"></param>
 public void UpLock(Hownet.Model.PayMain model)
 {
     dal.UpLock(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Hownet.Model.PayMain model)
 {
     dal.Update(model);
 }
Exemplo n.º 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(Hownet.Model.PayMain model)
 {
     return(dal.Add(model));
 }