Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <DTcms.Model.StoreOutGoodsWithVehicles> DataTableToList(DataTable dt)
        {
            List <DTcms.Model.StoreOutGoodsWithVehicles> modelList = new List <DTcms.Model.StoreOutGoodsWithVehicles>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                DTcms.Model.StoreOutGoodsWithVehicles model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DTcms.Model.StoreOutGoodsWithVehicles();
                    if (dt.Rows[n]["StoreOutGoodsStoreOutOrderId"].ToString() != "")
                    {
                        model.StoreOutGoodsStoreOutOrderId = int.Parse(dt.Rows[n]["StoreOutGoodsStoreOutOrderId"].ToString());
                    }
                    if (dt.Rows[n]["StoreOutGoodsId"].ToString() != "")
                    {
                        model.StoreOutGoodsId = int.Parse(dt.Rows[n]["StoreOutGoodsId"].ToString());
                    }
                    if (dt.Rows[n]["StoreOutGoodsVehicleId"].ToString() != "")
                    {
                        model.StoreOutGoodsVehicleId = int.Parse(dt.Rows[n]["StoreOutGoodsVehicleId"].ToString());
                    }


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(DTcms.Model.StoreOutGoodsWithVehicles model)
 {
     return(dal.Update(model));
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void  Add(DTcms.Model.StoreOutGoodsWithVehicles model)
 {
     dal.Add(model);
 }