protected void btnSave_Click(object sender, EventArgs e) { DataTable tbl = gvProfile.DataSource as DataTable; if (tbl == null) { tbl = GetData(); } RadioButtonList rblst = null; string strRecord_id = ""; int indx = 0; foreach (DataRow dr in tbl.Rows) { //rblst = FindControl( "rblst_" + indx.ToString()) as RadioButtonList ; rblst = Bas_Utility.Utilities.GetRadioButtonList(Page, "rblst_" + indx.ToString()); indx++; strRecord_id = rblst.ID.Replace("rblst_", ""); if (rblst.SelectedValue.Equals("1")) { } else if (rblst.SelectedValue.Equals("0")) { } else { jscriptsFunctions.Misc.Alert(Page, "A Decision must be made for ALL items"); return; } } strRecord_id = ""; indx = 0; Oracle.DataAccess.Client.OracleConnection conn = SQLStatic.SQL.OracleConnection(); Oracle.DataAccess.Client.OracleTransaction tx = conn.BeginTransaction(); try { foreach (DataRow dr in tbl.Rows) { //rblst = FindControl( "rblst_" + indx.ToString()) as RadioButtonList; rblst = Bas_Utility.Utilities.GetRadioButtonList(Page, "rblst_" + indx.ToString()); indx++; strRecord_id = rblst.ID.Replace("rblst_", ""); if (rblst.SelectedValue.Equals("1")) { if (dr["which"].ToString().Equals("a")) { processAddress(dr); } else { processProfile(dr); } ViewState["email_apprve"] = "0"; } //else if (rblst.SelectedValue.Equals("0")) //{ //} //else //{ // //tx.Rollback(); // //string strError = "<script>alert('You must ckeck all the dependents first')</script>"; // //Page.ClientScript.RegisterStartupScript(Page.GetType(), "strError", strError); // //return; //} } Data.Close_pending_ee_profile_addrs(session_id, ViewState["EE_Number"].ToString()); tx.Commit(); } catch { tx.Rollback(); throw; } finally { SQLStatic.SQL.CloseConnection(conn); } jscriptsFunctions.Misc.AlertSaved(Page); btnNext_Click(null, null); //Response.Redirect("Profile.aspx?SkipCheck=YES&ee=" + Request.Params["ee"], true); }