Пример #1
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode = CommandMode.D;
     objTax  = new Store.Tax.BusinessObject.Tax();
     oblTax  = new Store.Tax.BusinessLogic.Tax();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objTax.TaxID          = Convert.ToInt32(dgvTax.DataKeys[gvrow.RowIndex].Value.ToString());
         objTax.TaxName        = "";
         objTax.TaxDisplayName = "";
         objTax.TaxValue       = 0;
         objTax.CreatedBy      = 1;
         objMessageInfo        = oblTax.ManageItemMaster(objTax, cmdMode);
         BindTax();
         updateTaxBdInfo.Update();
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Tax).FullName, 1);
     }
     finally
     {
         objTax         = null;
         objMessageInfo = null;
         oblTax         = null;
     }
 }
Пример #2
0
 void ManageTax()
 {
     objTax = new Store.Tax.BusinessObject.Tax();
     oblTax = new Store.Tax.BusinessLogic.Tax();
     try
     {
         if (cmdMode == Store.Common.CommandMode.M)
         {
             objTax.TaxID = Convert.ToInt32(txtTaxId.Text);
             //objTax.ModifiedBy = Convert.ToInt32(Session["UserId"]);
         }
         else
         {
             objTax.TaxID = 0;
             //objTax.CreatedBy = Convert.ToInt32(Session["UserId"]);
         }
         objTax.TaxName        = Convert.ToString(txtTaxName.Text);
         objTax.TaxDisplayName = Convert.ToString(txtTaxDisplayName.Text);
         objTax.TaxValue       = Convert.ToDecimal(txtTaxValue.Text);
         objMessageInfo        = oblTax.ManageItemMaster(objTax, cmdMode);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Tax).FullName, 1);
     }
     finally
     {
         objTax = null;
         //objMessageInfo = null;
         oblTax = null;
     }
 }