Exemple #1
0
 void ManageCurrency()
 {
     objCurrency = new Store.Currency.BusinessObject.Currency();
     oblCurrency = new Store.Currency.BusinessLogic.Currency();
     try
     {
         if (cmdMode == Store.Common.CommandMode.M)
         {
             objCurrency.CurrencyID = Convert.ToInt32(txtCurrencyId.Text);
             //objCurrency.ModifiedBy = Convert.ToInt32(Session["UserId"].ToString());
         }
         else
         {
             objCurrency.CurrencyID = 0;
             //objCurrency.CreatedBy = Convert.ToInt32(Session["UserId"].ToString());
         }
         objCurrency.Sign         = "";
         objCurrency.CurrencyName = Convert.ToString(txtCurrencyName.Text);
         objMessageInfo           = oblCurrency.ManageItemMaster(objCurrency, cmdMode);
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Currency).FullName, 1);
     }
     finally
     {
         objCurrency = null;
         oblCurrency = null;
     }
 }
Exemple #2
0
 protected void imgbtnfrDelete_Click(object sender, ImageClickEventArgs e)
 {
     cmdMode     = CommandMode.D;
     objCurrency = new Store.Currency.BusinessObject.Currency();
     oblCurrency = new Store.Currency.BusinessLogic.Currency();
     try
     {
         ImageButton btndetails = sender as ImageButton;
         GridViewRow gvrow      = (GridViewRow)btndetails.NamingContainer;
         objCurrency.CurrencyID   = Convert.ToInt32(dgvCurrency.DataKeys[gvrow.RowIndex].Value.ToString());
         objCurrency.CurrencyName = "";
         objCurrency.CreatedBy    = 1;
         objMessageInfo           = oblCurrency.ManageItemMaster(objCurrency, cmdMode);
         ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "alert", "alert('" + objMessageInfo.TranMessage + "')", true);
         BindCurrency();
         updateCurrencyBdInfo.Update();
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Currency).FullName, 1);
     }
     finally
     {
         objCurrency    = null;
         objMessageInfo = null;
         oblCurrency    = null;
     }
 }
Exemple #3
0
 void BindCurrency()
 {
     oblCurrency = new Store.Currency.BusinessLogic.Currency();
     try
     {
         obCurrencyList = oblCurrency.GetAllCurrencyList(0, 0, "");
         if (obCurrencyList != null)
         {
             dgvCurrency.DataSource = obCurrencyList;
             dgvCurrency.DataBind();
         }
         else
         {
             dgvCurrency.DataSource = null;
             dgvCurrency.DataBind();
         }
     }
     catch (Exception ex)
     {
         Store.Common.Utility.ExceptionLog.Exceptionlogs(ex.Message, Store.Common.Utility.ExceptionLog.LineNumber(ex), typeof(Currency).FullName, 1);
     }
     finally
     {
         oblCurrency    = null;
         obCurrencyList = null;
     }
 }