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

            if (rowsCount > 0)
            {
                Maticsoft.Model.StockGoods model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.StockGoods();
                    model.LocationName  = dt.Rows[n]["LocationName"].ToString();
                    model.Weight        = dt.Rows[n]["Weight"].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);
        }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.StockGoods model)
 {
     return(dal.Update(model));
 }
Exemple #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(Maticsoft.Model.StockGoods model)
 {
     dal.Add(model);
 }