Example #1
0
        //item details



        //Stockout Gateway
        public bool StockOutData(StockOut aStockOut)
        {
            int    rowCount = 0;
            string querry   = "INSERT INTO T_StockOut VALUES((select ID from T_Item,T_Company where T_Company.ComID=T_Item.CompanyID AND ItemName='" + aStockOut.ItemName + "' AND ComName='" + aStockOut.companyName + "'), " + aStockOut.Quantity + ", '" + aStockOut.StockOutCategory + "', '" + aStockOut.Date + "')";

            try
            {
                cmd      = new SqlCommand(querry, oConnectionClass.GetConnection());
                rowCount = cmd.ExecuteNonQuery();
            }
            finally
            {
                oConnectionClass.GetClose();
            }
            return(true);
        }
Example #2
0
 protected void damageButton_Click(object sender, EventArgs e)
 {
     if (StockOutGridView != null)
     {
         List <StockOutItem> stockOutItems = (List <StockOutItem>)Session["items"];
         foreach (StockOutItem items in stockOutItems)
         {
             aStockOut                  = new StockOut();
             aStockOut.ItemName         = items.ItemName;
             aStockOut.companyName      = items.companyName;
             aStockOut.Quantity         = Convert.ToInt32(items.Quantity);
             aStockOut.StockOutCategory = "damage";
             aStockOut.Date             = date;
             aShopManager.StockOutData(aStockOut);
         }
         stockOutQTextBox.Text       = "0";
         StockOutGridView.DataSource = null;
         StockOutGridView.DataBind();
     }
 }
Example #3
0
 //StockOut manager
 public bool StockOutData(StockOut aStockOut)
 {
     return(aGateway.StockOutData(aStockOut));
 }