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

            if (rowsCount > 0)
            {
                DTcms.Model.StoreInGoodsVehicle model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DTcms.Model.StoreInGoodsVehicle();
                    if (dt.Rows[n]["Id"].ToString() != "")
                    {
                        model.Id = int.Parse(dt.Rows[n]["Id"].ToString());
                    }
                    if (dt.Rows[n]["VehicleId"].ToString() != "")
                    {
                        model.VehicleId = int.Parse(dt.Rows[n]["VehicleId"].ToString());
                    }
                    model.Remark = dt.Rows[n]["Remark"].ToString();
                    if (dt.Rows[n]["Count"].ToString() != "")
                    {
                        model.Count = decimal.Parse(dt.Rows[n]["Count"].ToString());
                    }


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List<DTcms.Model.StoreInGoodsVehicle> DataTableToList(DataTable dt)
        {
            List<DTcms.Model.StoreInGoodsVehicle> modelList = new List<DTcms.Model.StoreInGoodsVehicle>();
            int rowsCount = dt.Rows.Count;
            if (rowsCount > 0)
            {
                DTcms.Model.StoreInGoodsVehicle model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DTcms.Model.StoreInGoodsVehicle();
                                                    if(dt.Rows[n]["StoreWaitingGoodsId"].ToString()!="")
                {
                    model.StoreWaitingGoodsId=int.Parse(dt.Rows[n]["StoreWaitingGoodsId"].ToString());
                }
                                                                                                                                if(dt.Rows[n]["VehicleId"].ToString()!="")
                {
                    model.VehicleId=int.Parse(dt.Rows[n]["VehicleId"].ToString());
                }
                                                                                                                                                model.Remark= dt.Rows[n]["Remark"].ToString();
                                                                                                                if(dt.Rows[n]["Count"].ToString()!="")
                {
                    model.Count=decimal.Parse(dt.Rows[n]["Count"].ToString());
                }

                    modelList.Add(model);
                }
            }
            return modelList;
        }
Ejemplo n.º 3
0
 public void AddGoodsVehicle(StoreInGoodsVehicle goodsVehicle)
 {
     _goodsVehicle.Add(goodsVehicle);
 }
Ejemplo n.º 4
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(DTcms.Model.StoreInGoodsVehicle model)
 {
     return(dal.Update(model));
 }
Ejemplo n.º 5
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(DTcms.Model.StoreInGoodsVehicle model)
 {
     dal.Add(model);
 }