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.AddNetwork(intParent, Int32.Parse(txtMin1.Text), Int32.Parse(txtMin2.Text), Int32.Parse(txtMin3.Text), Int32.Parse(txtMin4.Text), Int32.Parse(txtMax4.Text), txtMask.Text, txtGateway.Text, Int32.Parse(txtStart.Text), Int32.Parse(txtMaximum.Text), (chkReverse.Checked ? 1 : 0), (chkRoutable.Checked ? 1 : 0), txtNotify.Text, (chkOnlyApps.Checked ? 1 : 0), (chkOnlyComponennts.Checked ? 1 : 0), txtDescription.Text, (chkEnabled.Checked ? 1 : 0));
            }
            else
            {
                oIPAddresses.UpdateNetwork(Int32.Parse(Request.Form[hdnId.UniqueID]), intParent, Int32.Parse(txtMin1.Text), Int32.Parse(txtMin2.Text), Int32.Parse(txtMin3.Text), Int32.Parse(txtMin4.Text), Int32.Parse(txtMax4.Text), txtMask.Text, txtGateway.Text, Int32.Parse(txtStart.Text), Int32.Parse(txtMaximum.Text), (chkReverse.Checked ? 1 : 0), (chkRoutable.Checked ? 1 : 0), txtNotify.Text, (chkOnlyApps.Checked ? 1 : 0), (chkOnlyComponennts.Checked ? 1 : 0), txtDescription.Text, (chkEnabled.Checked ? 1 : 0));
            }
            Response.Redirect(Request.Path);
        }