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

            if (rowsCount > 0)
            {
                DTcms.Model.ReceivedOfStoreInGoods model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new DTcms.Model.ReceivedOfStoreInGoods();
                    if (dt.Rows[n]["ReceivedMoneyId"].ToString() != "")
                    {
                        model.ReceivedMoneyId = int.Parse(dt.Rows[n]["ReceivedMoneyId"].ToString());
                    }
                    if (dt.Rows[n]["StoreInGoodsStoreInOrderId"].ToString() != "")
                    {
                        model.StoreInGoodsStoreInOrderId = int.Parse(dt.Rows[n]["StoreInGoodsStoreInOrderId"].ToString());
                    }
                    if (dt.Rows[n]["StoreInGoodsId"].ToString() != "")
                    {
                        model.StoreInGoodsId = int.Parse(dt.Rows[n]["StoreInGoodsId"].ToString());
                    }


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

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