private void Get_email() { DataTable dt = Data.GetDepedenApprovalEmail(SQLStatic.EmployeeData.Account_Number(rblstEmployees.SelectedValue)); if (dt.Rows.Count.Equals(0)) { ViewState["decline_suject"] = ""; ViewState["decline_text"] = ""; ViewState["Approve_subject"] = ""; ViewState["Approve_text"] = ""; } else { ViewState["decline_suject"] = dt.Rows[1]["subject"].ToString(); ViewState["decline_text"] = dt.Rows[1]["memo"].ToString(); ViewState["Approve_subject"] = dt.Rows[0]["subject"].ToString(); ViewState["Approve_text"] = dt.Rows[0]["memo"].ToString(); } ViewState["Default_Emal"] = Data.employee_email(rblstEmployees.SelectedValue); if (!string.IsNullOrEmpty(SQLStatic.Sessions.GetSessionValue(session_id, "Approve_Subject"))) { ViewState["Approve_subject"] = SQLStatic.Sessions.GetSessionValue(session_id, "Approve_Subject"); ViewState["Approve_text"] = SQLStatic.Sessions.GetCLOBSessionValue(session_id, "Approve"); ViewState["Approve_Email"] = SQLStatic.Sessions.GetSessionValue(session_id, "Approve_Email"); } if (!string.IsNullOrEmpty(SQLStatic.Sessions.GetSessionValue(session_id, "Disapprove_Subject"))) { ViewState["decline_suject"] = SQLStatic.Sessions.GetSessionValue(session_id, "Disapprove_Subject"); ViewState["decline_text"] = SQLStatic.Sessions.GetCLOBSessionValue(session_id, "Disapprove"); ViewState["Disapprove_Email"] = SQLStatic.Sessions.GetSessionValue(session_id, "Disapprove_Email"); } }