protected void btnAdd_Click(Object Sender, EventArgs e) { if (Request.Form[hdnId.UniqueID] == "0") { oVMWare.AddFolder(Int32.Parse(ddlParent.SelectedItem.Value), txtName.Text, txtNotification.Text, Int32.Parse(ddlClass.SelectedItem.Value), Int32.Parse(Request.Form[hdnEnvironment.UniqueID]), Int32.Parse(Request.Form[hdnLocation.UniqueID]), (chkEnabled.Checked ? 1 : 0)); } else { oVMWare.UpdateFolder(Int32.Parse(Request.Form[hdnId.UniqueID]), Int32.Parse(ddlParent.SelectedItem.Value), txtName.Text, txtNotification.Text, Int32.Parse(ddlClass.SelectedItem.Value), Int32.Parse(Request.Form[hdnEnvironment.UniqueID]), Int32.Parse(Request.Form[hdnLocation.UniqueID]), (chkEnabled.Checked ? 1 : 0)); } Response.Redirect(Request.Path); }
protected void btnUpdateF_Click(object sender, EventArgs e) { int f = 0; if (Int32.TryParse(Request.QueryString["f"], out f) == true) { oVMWare.UpdateFolder(f, Int32.Parse(lblFParent.ToolTip), txtFName.Text, txtFNotification.Text, 0, 0, 0, (chkFEnabled.Checked ? 1 : 0)); } else { oVMWare.AddFolder(Int32.Parse(lblFParent.ToolTip), txtFName.Text, txtFNotification.Text, 0, 0, 0, (chkFEnabled.Checked ? 1 : 0)); } Response.Redirect(FormURL("")); }