protected void btnAdd_Click(Object Sender, EventArgs e) { if (Request.Form[hdnId.UniqueID] == "0") { oScheduling.Add(txtName.Text, txtFac.Text, txtNet.Text, txtConf.Text, txtPass.Text, DateTime.Parse(txtDate.Text), txtStart.Text, txtEnd.Text, Int32.Parse(txtMax.Text), txtLocation.Text); } else { oScheduling.Update(Int32.Parse(Request.Form[hdnId.UniqueID]), txtName.Text, txtFac.Text, txtNet.Text, txtConf.Text, txtPass.Text, DateTime.Parse(txtDate.Text), txtStart.Text, txtEnd.Text, Int32.Parse(txtMax.Text), txtLocation.Text); } Response.Redirect(Request.Path); }