protected void Page_Load(object sender, EventArgs e) { try { if (Session["user"] == null) { Response.Redirect("Default.aspx"); } else { string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null && per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Default.aspx"); } } } catch { Response.Redirect("Default.aspx"); } txtOpenDate.Attributes.Add("onBlur", "formatdate('" + txtOpenDate.ClientID + "')"); if (!IsPostBack) { DataTable dtLvl = LvlManager.GetLevels(); dgLevel.DataSource = dtLvl; dgLevel.DataBind(); dgGlCoaGen.DataSource = LvlManager.GetLevelsGrid(); dgGlCoaGen.DataBind(); Populate(); TreeView1.CollapseAll(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Session.SessionID != "" | Session.SessionID != null) { clsSession ses = clsSessionManager.getSession(Session.SessionID); if (ses != null) { Session["user"] = ses.UserId; Session["wnote"] = UsersManager.getUserName(ses.UserId); Session["book"] = "AMB"; string connectionString = DataManager.OraConnString(); SqlDataReader dReader; SqlConnection conn = new SqlConnection(); conn.ConnectionString = connectionString; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select ID,user_grp,description from utl_userinfo where upper(user_name)=upper('" + Session["user"].ToString().ToUpper() + "') and status='A'"; conn.Open(); dReader = cmd.ExecuteReader(); string wnot = ""; if (dReader.HasRows == true) { while (dReader.Read()) { Session["userlevel"] = int.Parse(dReader["user_grp"].ToString()); wnot = dReader["description"].ToString(); } Session["wnote"] = wnot; Session["USER_ID"] = dReader["ID"].ToString(); cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select book_desc,company_address1,company_address2,separator_type from gl_set_of_books where book_name='" + Session["book"].ToString() + "' "; if (dReader.IsClosed == false) { dReader.Close(); } dReader = cmd.ExecuteReader(); if (dReader.HasRows == true) { while (dReader.Read()) { Session["septype"] = dReader["separator_type"].ToString(); Session["org"] = dReader["book_desc"].ToString(); Session["add1"] = dReader["company_address1"].ToString(); Session["add2"] = dReader["company_address2"].ToString(); } } } dReader.Close(); conn.Close(); } } } try { string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null & per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Home.aspx?sid=sam"); } } catch { Response.Redirect("Default.aspx?sid=sam"); } if (!IsPostBack) { RefreshAll(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Session.SessionID != "" | Session.SessionID != null) { clsSession ses = clsSessionManager.getSession(Session.SessionID); if (ses != null) { Session["user"] = ses.UserId; Session["book"] = "AMB"; string connectionString = DataManager.OraConnString(); SqlDataReader dReader; SqlConnection conn = new SqlConnection(); conn.ConnectionString = connectionString; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select user_grp,description from utl_userinfo where upper(user_name)=upper('" + Session["user"].ToString().ToUpper() + "') and status='A'"; conn.Open(); dReader = cmd.ExecuteReader(); string wnot = ""; if (dReader.HasRows == true) { while (dReader.Read()) { Session["userlevel"] = int.Parse(dReader["user_grp"].ToString()); wnot = "KHSC Mr. " + dReader["description"].ToString(); } Session["wnote"] = wnot; cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select book_desc,company_address1,company_address2,separator_type from gl_set_of_books where book_name='" + Session["book"].ToString() + "' "; if (dReader.IsClosed == false) { dReader.Close(); } dReader = cmd.ExecuteReader(); if (dReader.HasRows == true) { while (dReader.Read()) { Session["septype"] = dReader["separator_type"].ToString(); Session["org"] = dReader["book_desc"].ToString(); Session["add1"] = dReader["company_address1"].ToString(); Session["add2"] = dReader["company_address2"].ToString(); } } } dReader.Close(); conn.Close(); } } } try { //ClientScript.RegisterStartupScript(this.GetType(), "ale", "alert('" + Session.SessionID + "');", true); string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null & per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Home.aspx?sid=sam"); } } catch { Response.Redirect("Default.aspx?sid=sam"); } if (!Page.IsPostBack) { DataTable dt = clsDesigManager.getDesigDetails(""); dgDesig.DataSource = dt; dgDesig.DataBind(); ddlMgrCode.Items.Clear(); string queryDesig = "select '' desig_code, '' desig_name union select desig_code,dbo.initcap(desig_name) desig_name from pmis_desig_code order by 2 desc"; util.PopulationDropDownList(ddlMgrCode, "Designation", queryDesig, "desig_name", "desig_code"); /*ddlGradeCode.Items.Clear(); * string queryScale = "select '' scale_detail_id, '' scale union select convert(scale_detail_id),scale from v_scale order by 2 desc"; * util.PopulationDropDownList(ddlGradeCode, "Scale", queryScale, "scale", "scale_detail_id"); */ ddlClass.Items.Clear(); string queryClass = "select '' class_id, '' class_name union select convert(varchar,class_id),class_name from pmis_class order by 2 desc"; util.PopulationDropDownList(ddlClass, "Scale", queryClass, "class_name", "class_id"); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Session.SessionID != "" | Session.SessionID != null) { clsSession ses = clsSessionManager.getSession(Session.SessionID); if (ses != null) { Session["user"] = ses.UserId; Session["book"] = "AMB"; string connectionString = DataManager.OraConnString(); SqlDataReader dReader; SqlConnection conn = new SqlConnection(); conn.ConnectionString = connectionString; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select user_grp,description from utl_userinfo where upper(user_name)=upper('" + Session["user"].ToString().ToUpper() + "') and status='A'"; conn.Open(); dReader = cmd.ExecuteReader(); string wnot = ""; if (dReader.HasRows == true) { while (dReader.Read()) { Session["userlevel"] = int.Parse(dReader["user_grp"].ToString()); wnot = dReader["description"].ToString(); } Session["wnote"] = wnot; cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select book_desc,company_address1,company_address2,separator_type from gl_set_of_books where book_name='" + Session["book"].ToString() + "' "; if (dReader.IsClosed == false) { dReader.Close(); } dReader = cmd.ExecuteReader(); if (dReader.HasRows == true) { while (dReader.Read()) { Session["septype"] = dReader["separator_type"].ToString(); Session["org"] = dReader["book_desc"].ToString(); Session["add1"] = dReader["company_address1"].ToString(); Session["add2"] = dReader["company_address2"].ToString(); } } } dReader.Close(); conn.Close(); } } } try { string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null && per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Default.aspx?sid=sam"); } } catch { Response.Redirect("Default.aspx?sid=sam"); } if (!IsPostBack) { try { DataTable dt = StudentManager.GetStudentAllCurrentStatus("", "", "", ""); dgPayHistory.DataSource = dt; dgPayHistory.DataBind(); } catch (FormatException fex) { ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('" + fex.Message + "');", true); } catch (Exception ex) { if (ex.Message.Contains("Database")) { ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('Database Maintain Error. Contact to the Software Provider..!!');", true); } else { ClientScript.RegisterStartupScript(this.GetType(), "Warning", "alert('There is some problem to do the task. Try again properly.!!');", true); } } } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Session.SessionID != "" | Session.SessionID != null) { clsSession ses = clsSessionManager.getSession(Session.SessionID); if (ses != null) { Session["user"] = ses.UserId; Session["book"] = "AMB"; string connectionString = DataManager.OraConnString(); using (SqlConnection conn = new SqlConnection(connectionString)) { string query = "Select user_grp,description from utl_userinfo where upper(user_name)=upper('" + Session["user"].ToString().ToUpper() + "') and status='A'"; using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.CommandType = CommandType.Text; conn.Open(); using (SqlDataReader dreader = cmd.ExecuteReader()) { if (dreader.HasRows == true) { while (dreader.Read()) { Session["userlevel"] = int.Parse(dreader["user_grp"].ToString()); Session["wnote"] = "Welcome Mr. " + dreader["description"].ToString(); } } } } } using (SqlConnection conn = new SqlConnection(connectionString)) { string query = "Select book_desc,company_address1,company_address2,separator_type from gl_set_of_books where book_name='" + Session["book"].ToString() + "' "; using (SqlCommand cmd = new SqlCommand(query, conn)) { cmd.CommandType = CommandType.Text; conn.Open(); using (SqlDataReader dreader = cmd.ExecuteReader()) { if (dreader.HasRows == true) { while (dreader.Read()) { Session["septype"] = dreader["separator_type"].ToString(); Session["org"] = dreader["book_desc"].ToString(); Session["add1"] = dreader["company_address1"].ToString(); Session["add2"] = dreader["company_address2"].ToString(); } } } } } } } } try { //ClientScript.RegisterStartupScript(this.GetType(), "ale", "alert('" + ViewState.ViewStateID + "');", true); string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null && per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Default.aspx?sid=sam"); } } catch { //ClientScript.RegisterStartupScript(this.GetType(), "ale", "alert('"+ex.Message+"!!');", true); Response.Redirect("Default.aspx?sid=sam"); } if (!IsPostBack) { } }
protected void Page_Load(object sender, EventArgs e) { if (Session["user"] == null) { if (Session.SessionID != "" | Session.SessionID != null) { clsSession ses = clsSessionManager.getSession(Session.SessionID); if (ses != null) { Session["user"] = ses.UserId; Session["book"] = "AMB"; string connectionString = DataManager.OraConnString(); SqlDataReader dReader; SqlConnection conn = new SqlConnection(); conn.ConnectionString = connectionString; SqlCommand cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select user_grp,description from utl_userinfo where upper(user_name)=upper('" + Session["user"].ToString().ToUpper() + "') and status='A'"; conn.Open(); dReader = cmd.ExecuteReader(); string wnot = ""; if (dReader.HasRows == true) { while (dReader.Read()) { Session["userlevel"] = int.Parse(dReader["user_grp"].ToString()); wnot = "KHSC Mr. " + dReader["description"].ToString(); } Session["wnote"] = wnot; cmd = new SqlCommand(); cmd.Connection = conn; cmd.CommandType = CommandType.Text; cmd.CommandText = "Select book_desc,company_address1,company_address2,separator_type from gl_set_of_books where book_name='" + Session["book"].ToString() + "' "; if (dReader.IsClosed == false) { dReader.Close(); } dReader = cmd.ExecuteReader(); if (dReader.HasRows == true) { while (dReader.Read()) { Session["septype"] = dReader["separator_type"].ToString(); Session["org"] = dReader["book_desc"].ToString(); Session["add1"] = dReader["company_address1"].ToString(); Session["add2"] = dReader["company_address2"].ToString(); } } } dReader.Close(); conn.Close(); } } } try { //ClientScript.RegisterStartupScript(this.GetType(), "ale", "alert('" + Session.SessionID + "');", true); string pageName = DataManager.GetCurrentPageName(); string modid = PermisManager.getModuleId(pageName); per = PermisManager.getUsrPermis(Session["user"].ToString().Trim().ToUpper(), modid); if (per != null & per.AllowView == "Y") { ((Label)Page.Master.FindControl("lblLogin")).Text = Session["wnote"].ToString(); ((LinkButton)Page.Master.FindControl("lbLogout")).Visible = true; } else { Response.Redirect("Home.aspx?sid=sam"); } } catch { Response.Redirect("Default.aspx?sid=sam"); } if (!Page.IsPostBack) { //string queryBank = "select '' BANK_ID, '' BANK_NAME union select BANK_ID,BANK_NAME from BANK_INFO order by 1"; //util.PopulationDropDownList(ddlBankNo, "Bank", queryBank, "BANK_NAME", "BANK_ID"); } }