/// <summary> /// Delete button click. /// </summary> protected void btnDelete_Click(object sender, EventArgs e) { try { // Create service wrapper. Office of = new Office(); of.Load(OfficeID.Value); using (ArrangementServiceProxy c = new ArrangementServiceProxy("http://localhost:59874/ArrangementService.svc", CurrentUser.ID)) { // If the checkbox is not checked and this arrangement is cyclic if (!cbCyclicArrangement.Checked && c.CheckCyclicArrangement(CurrentArrangement.ArrangementID)) c.DeleteOneOfCyclicArrangements(CurrentArrangement.ArrangementID, (DateTime)CurrentArrangementDate); else c.DeleteArrangement(CurrentArrangement.ArrangementID); } } catch (Exception ex) { ConfirmIt.PortalLib.Logger.Logger.Instance.Error(ex.Message, ex); } Response.Redirect("~//Admin//AdminArrangements//AdminArrangementsPage.aspx"); }
/// <summary> /// Delete button click. /// </summary> protected void btnDelete_Click(object sender, EventArgs e) { try { // Create service wrapper. Office of = new Office(); of.Load(OfficeID.Value); using (ArrangementServiceProxy c = new ArrangementServiceProxy("http://localhost:59874/ArrangementService.svc", CurrentUser.ID)) { c.DeleteArrangement(CurrentArrangement.ArrangementID); } } catch (Exception ex) { UlterSystems.PortalLib.Logger.Log.Error(ex.Message, ex); } Response.Redirect("~//Arrangements//Default.aspx"); }