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

            if (Request.Form[hdnId.UniqueID] == "0")
            {
                oModelsProperties.AddNetwork(intParent, (chkAvailable.Checked ? 1 : 0), Int32.Parse(txtReplicate.Text), double.Parse(txtAmp.Text), Int32.Parse(txtPorts.Text), (chkEnabled.Checked ? 1 : 0));
            }
            else
            {
                oModelsProperties.UpdateNetwork(Int32.Parse(Request.Form[hdnId.UniqueID]), intParent, (chkAvailable.Checked ? 1 : 0), Int32.Parse(txtReplicate.Text), double.Parse(txtAmp.Text), Int32.Parse(txtPorts.Text), (chkEnabled.Checked ? 1 : 0));
            }
            Response.Redirect(Request.Path);
        }