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

            if (Request.Form[hdnId.UniqueID] == "0")
            {
                oIPAddresses.AddDhcp(intParent, Int32.Parse(txtMin4.Text), Int32.Parse(txtMax4.Text), txtIPNotify.Text, Int32.Parse(txtIPLeft.Text), (chkEnabled.Checked ? 1 : 0));
            }
            else
            {
                oIPAddresses.UpdateDhcp(Int32.Parse(Request.Form[hdnId.UniqueID]), intParent, Int32.Parse(txtMin4.Text), Int32.Parse(txtMax4.Text), txtIPNotify.Text, Int32.Parse(txtIPLeft.Text), (chkEnabled.Checked ? 1 : 0));
            }
            Response.Redirect(Request.Path);
        }