Exemplo n.º 1
0
        public int Insert(SqlTransaction trans, AllocationStockModel stockModel)
        {
            int num = 0;

            if ((stockModel.ACode != "") && (stockModel.SCode != ""))
            {
                num = AllocationAction.Insert(trans, stockModel);
            }
            return(num);
        }
Exemplo n.º 2
0
        public int Update(AllocationStockModel stockModel)
        {
            int num = 0;

            if (stockModel.Asid != "")
            {
                num = AllocationAction.Update(stockModel);
            }
            return(num);
        }
Exemplo n.º 3
0
 private void GetStockModel(SqlTransaction trans)
 {
     if (this.ViewState["DataTable"] is DataTable)
     {
         DataTable table = this.ViewState["DataTable"] as DataTable;
         new List <StorageStockModel>();
         foreach (DataRow row in table.Rows)
         {
             AllocationStockModel stockModel = new AllocationStockModel {
                 Number = Convert.ToDecimal(row["number"].ToString()),
                 Sprice = Convert.ToDecimal(row["price"].ToString()),
                 Corp   = row["suppyCode"].ToString(),
                 ACode  = this.Acode,
                 SCode  = row["ResourceCode"].ToString(),
                 Asid   = Guid.NewGuid().ToString()
             };
             this.bllAction1.Insert(trans, stockModel);
         }
     }
 }