/// <summary>
 /// Handles the Click event of the btnAdd control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     try {
     SimpleWeightShippingRate simpleWeightShippingRate = new SimpleWeightShippingRate();
     simpleWeightShippingRate.Service = txtService.Text.Trim();
     decimal amountPerUnit = 0.00M;
     decimal.TryParse(txtAmountPerUnit.Text.Trim(), out amountPerUnit);
     simpleWeightShippingRate.AmountPerUnit = amountPerUnit;
     simpleWeightShippingRate.Save();
     LoadSimpleShippingWeightRates();
     txtService.Text = string.Empty;
     txtAmountPerUnit.Text = string.Empty;
     base.MasterPage.MessageCenter.DisplaySuccessMessage(LocalizationUtility.GetText("lblServiceAdded"));
       }
       catch(Exception ex) {
     Logger.Error(typeof(simpleweightconfiguration).Name + ".btnAdd_Click", ex);
     base.MasterPage.MessageCenter.DisplayCriticalMessage(ex.Message);
       }
 }
 /// <summary>
 /// Handles the Click event of the btnAdd control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="T:System.EventArgs"/> instance containing the event data.</param>
 protected void btnAdd_Click(object sender, EventArgs e)
 {
     try {
         SimpleWeightShippingRate simpleWeightShippingRate = new SimpleWeightShippingRate();
         simpleWeightShippingRate.Service = txtService.Text.Trim();
         decimal amountPerUnit = 0.00M;
         decimal.TryParse(txtAmountPerUnit.Text.Trim(), out amountPerUnit);
         simpleWeightShippingRate.AmountPerUnit = amountPerUnit;
         simpleWeightShippingRate.Save();
         LoadSimpleShippingWeightRates();
         txtService.Text       = string.Empty;
         txtAmountPerUnit.Text = string.Empty;
         base.MasterPage.MessageCenter.DisplaySuccessMessage(LocalizationUtility.GetText("lblServiceAdded"));
     }
     catch (Exception ex) {
         Logger.Error(typeof(simpleweightconfiguration).Name + ".btnAdd_Click", ex);
         base.MasterPage.MessageCenter.DisplayCriticalMessage(ex.Message);
     }
 }
        public void Insert(string Service,decimal AmountPerUnit,string CreatedBy,DateTime CreatedOn,string ModifiedBy,DateTime ModifiedOn)
        {
            SimpleWeightShippingRate item = new SimpleWeightShippingRate();

            item.Service = Service;

            item.AmountPerUnit = AmountPerUnit;

            item.CreatedBy = CreatedBy;

            item.CreatedOn = CreatedOn;

            item.ModifiedBy = ModifiedBy;

            item.ModifiedOn = ModifiedOn;

            item.Save(UserName);
        }