Exemplo n.º 1
0
        protected void btnAdd_Click(Object Sender, EventArgs e)
        {
            int intParent = Int32.Parse(Request.Form[hdnParent.UniqueID]);

            if (Request.Form[hdnId.UniqueID] == "0")
            {
                oServerName.AddCode(txtCode.Text, Int32.Parse(ddlClass.SelectedItem.Value), Int32.Parse(Request.Form[hdnEnvironment.UniqueID]), intParent, (chkEnabled.Checked ? 1 : 0));
            }
            else
            {
                oServerName.UpdateCode(Int32.Parse(Request.Form[hdnId.UniqueID]), txtCode.Text, Int32.Parse(ddlClass.SelectedItem.Value), Int32.Parse(Request.Form[hdnEnvironment.UniqueID]), intParent, (chkEnabled.Checked ? 1 : 0));
            }
            Response.Redirect(Request.Path);
        }