private void Save() { if (!base.ValidateIfCommandAllowed(Request.Url.AbsoluteUri, ENums.PageCommand.Add)) { return; } if (!ValidateValues()) { return; } AccomodationSeasonDTO accomodationSeasonDto = new AccomodationSeasonDTO(); AccomodationMaster oAccomMaster = new AccomodationMaster(); bool bActionCompleted; accomodationSeasonDto = MapControlsToObject(); bActionCompleted = oAccomMaster.InsertAccomodationSeason(accomodationSeasonDto); if (bActionCompleted == true) { base.DisplayAlert("The record has been insert successfully"); ClearControls(); lblStatus.Text = "Saved"; } else { lblStatus.Text = "Error Occured while saving: Please refer to the error log."; return; } RefreshGrid(); accomodationSeasonDto = null; oAccomMaster = null; }