示例#1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Maticsoft.Model.LocationRecord> DataTableToList(DataTable dt)
        {
            List <Maticsoft.Model.LocationRecord> modelList = new List <Maticsoft.Model.LocationRecord>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Maticsoft.Model.LocationRecord model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.LocationRecord();
                    model.LocationName  = dt.Rows[n]["LocationName"].ToString();
                    model.GoodsName     = dt.Rows[n]["GoodsName"].ToString();
                    model.GoodsCode     = dt.Rows[n]["GoodsCode"].ToString();
                    model.GoodsContract = dt.Rows[n]["GoodsContract"].ToString();
                    model.GoodsNum      = dt.Rows[n]["GoodsNum"].ToString();
                    model.InTime        = dt.Rows[n]["InTime"].ToString();
                    model.OutTime       = dt.Rows[n]["OutTime"].ToString();
                    model.UserName      = dt.Rows[n]["UserName"].ToString();
                    model.Action        = dt.Rows[n]["Action"].ToString();


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool UpdateByLocName(Maticsoft.Model.LocationRecord model, bool flag)
 {
     return(dal.UpdateByLocName(model, flag));
 }
示例#3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.LocationRecord model)
 {
     return(dal.Update(model));
 }
示例#4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(Maticsoft.Model.LocationRecord model)
 {
     dal.Add(model);
 }