void lbSave_Click(object sender, EventArgs e) { CountryDeliveryWeight cdw = new CountryDeliveryWeight(); cdw.Price = Convert.ToDecimal(txtPrice.Text); cdw.WeightLevel = Convert.ToDecimal(txtWeight.Text); cdw.CountryCode = Country; try { controller.DeliveryService.Save(cdw); lblMessage.Text = "Your new weight band has been saved"; plhAdd.Visible = false; } catch (Exception ex) { LogManager.GetLogger(GetType()).Error(ex); lblMessage.Text = "Your new weight band has NOT been saved. This is probably because the weight level you entered already exsists for this market."; } }
public void Delete(CountryDeliveryWeight cdw) { _dao.DeleteObject(cdw); }
public void Save(CountryDeliveryWeight cdw) { _dao.SaveOrUpdateObject(cdw); }