Exemplo n.º 1
0
 void ManageStock()
 {
     objStock = new Store.Stock.BusinessObject.Stock();
     oblStock = new Store.Stock.BusinessLogic.Stock();
     try
     {
         if (cmdMode == Store.Common.CommandMode.M)
         {
             objStock.StockID = Convert.ToInt32(txtStockId.Text);
         }
         else
         {
             objStock.StockID = 0;
         }
         objStock.ItemID        = Convert.ToInt32(ddlItemId.SelectedItem.Value);
         objStock.StockQuantity = Convert.ToInt32(txtQuantity.Text);
         objMessageInfo         = oblStock.ManageStockMaster(objStock, cmdMode);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Stock).FullName, 1);
     }
     finally
     {
         objStock = null;
         // objMessageInfo = null;
         oblStock = null;
     }
 }
Exemplo n.º 2
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode  = CommandMode.D;
     objStock = new Store.Stock.BusinessObject.Stock();
     oblStock = new Store.Stock.BusinessLogic.Stock();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objStock.StockID = Convert.ToInt32(dgvStock.DataKeys[gvrow.RowIndex].Value.ToString());
         objMessageInfo   = oblStock.ManageStockMaster(objStock, cmdMode);
         BindStock();
         updateStockBdInfo.Update();
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Stock).FullName, 1);
     }
     finally
     {
         objStock       = null;
         objMessageInfo = null;
         oblStock       = null;
     }
 }
Exemplo n.º 3
0
 void BindStock()
 {
     oblStock = new Store.Stock.BusinessLogic.Stock();
     try
     {
         objStockList = oblStock.GetAllStockList(0, 0, "");
         if (objStockList != null)
         {
             dgvStock.DataSource = objStockList;
             dgvStock.DataBind();
         }
         else
         {
             dgvStock.DataSource = null;
             dgvStock.DataBind();
         }
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Stock).FullName, 1);
     }
     finally
     {
         oblStock     = null;
         objStockList = null;
     }
 }