private void SetData() { bool flag = false; try { if (supervisor.GetAll().Where(x => x.GTC == "Yes").ToList().Count() >= 3 && cbGTC.Checked == true) { pnlResponseFail.Visible = true; } else { supervisor.User.FullName = txtFname.Text; supervisor.User.Email = txtEmail.Text; supervisor.User.Gender = rblGender.SelectedIndex == 0 ? "Male" : "Female"; supervisor.User.Contact = txtContact.Text; supervisor.User.CNIC = txtCnic.Text; supervisor.GTC = cbGTC.Checked == true ? "Yes" : "No"; supervisor.Title = txtJobTitle.Text; supervisor.EditProfile(); Session.Add("success", true); flag = true; } } catch { Session.Add("fail", true); } if (flag) { Response.Redirect("/Admin/Faculty"); } }
private void SetData() { try { supervisor.User.CNIC = txtCnic.Text; supervisor.User.Contact = txtContact.Text; supervisor.User.Email = txtEmail.Text; supervisor.User.FullName = txtFname.Text; supervisor.User.Gender = rblGender.SelectedIndex == 0 ? "Male" : "Female"; supervisor.Title = txtJobTitle.Text; supervisor.EditProfile(); Session.Add("success", true); } catch { Session.Add("fail", true); } Response.Redirect("/Supervisor/Profile"); }