Ejemplo n.º 1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Hownet.Model.HandBackMain> GetModelList(string strWhere)
        {
            DataSet ds = dal.GetList(strWhere);
            List <Hownet.Model.HandBackMain> modelList = new List <Hownet.Model.HandBackMain>();
            int rowsCount = ds.Tables[0].Rows.Count;

            if (rowsCount > 0)
            {
                Hownet.Model.HandBackMain model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Hownet.Model.HandBackMain();
                    if (ds.Tables[0].Rows[n]["MainID"].ToString() != "")
                    {
                        model.MainID = int.Parse(ds.Tables[0].Rows[n]["MainID"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["DateTime"].ToString() != "")
                    {
                        model.DateTime = DateTime.Parse(ds.Tables[0].Rows[n]["DateTime"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["Num"].ToString() != "")
                    {
                        model.Num = int.Parse(ds.Tables[0].Rows[n]["Num"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["EmployeeID"].ToString() != "")
                    {
                        model.EmployeeID = int.Parse(ds.Tables[0].Rows[n]["EmployeeID"].ToString());
                    }
                    model.Remark = ds.Tables[0].Rows[n]["Remark"].ToString();
                    if (ds.Tables[0].Rows[n]["IsVerify"].ToString() != "")
                    {
                        model.IsVerify = int.Parse(ds.Tables[0].Rows[n]["IsVerify"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["VerifyManID"].ToString() != "")
                    {
                        model.VerifyManID = int.Parse(ds.Tables[0].Rows[n]["VerifyManID"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["VerifyDateTime"].ToString() != "")
                    {
                        model.VerifyDateTime = DateTime.Parse(ds.Tables[0].Rows[n]["VerifyDateTime"].ToString());
                    }
                    if (ds.Tables[0].Rows[n]["IsEnd"].ToString() != "")
                    {
                        model.IsEnd = int.Parse(ds.Tables[0].Rows[n]["IsEnd"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Hownet.Model.HandBackMain> DataTableToList(DataTable dt)
        {
            List <Hownet.Model.HandBackMain> modelList = new List <Hownet.Model.HandBackMain>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Hownet.Model.HandBackMain model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Hownet.Model.HandBackMain();
                    if (dt.Rows[n]["MainID"].ToString() != "")
                    {
                        model.MainID = int.Parse(dt.Rows[n]["MainID"].ToString());
                    }
                    if (dt.Rows[n]["DateTime"].ToString() != "")
                    {
                        model.DateTime = DateTime.Parse(dt.Rows[n]["DateTime"].ToString());
                    }
                    if (dt.Rows[n]["Num"].ToString() != "")
                    {
                        model.Num = int.Parse(dt.Rows[n]["Num"].ToString());
                    }
                    if (dt.Rows[n]["EmployeeID"].ToString() != "")
                    {
                        model.EmployeeID = int.Parse(dt.Rows[n]["EmployeeID"].ToString());
                    }
                    model.Remark = dt.Rows[n]["Remark"].ToString();
                    if (dt.Rows[n]["IsVerify"].ToString() != "")
                    {
                        model.IsVerify = int.Parse(dt.Rows[n]["IsVerify"].ToString());
                    }
                    if (dt.Rows[n]["VerifyManID"].ToString() != "")
                    {
                        model.VerifyManID = int.Parse(dt.Rows[n]["VerifyManID"].ToString());
                    }
                    if (dt.Rows[n]["VerifyDateTime"].ToString() != "")
                    {
                        model.VerifyDateTime = DateTime.Parse(dt.Rows[n]["VerifyDateTime"].ToString());
                    }
                    if (dt.Rows[n]["IsEnd"].ToString() != "")
                    {
                        model.IsEnd = int.Parse(dt.Rows[n]["IsEnd"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(Hownet.Model.HandBackMain model)
 {
     dal.Update(model);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Hownet.Model.HandBackMain model)
 {
     return(dal.Add(model));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 更新是否审核
 /// </summary>
 public void UpVerify(Hownet.Model.HandBackMain model)
 {
     dal.UpVerify(model);
 }