protected void Page_Load(object sender, EventArgs e) { try {//////////security//////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {///////////security///////// if (!IsPostBack) { binddata(); lblemp.Text = Session["AUserName"].ToString(); lblformno.Text = Request.QueryString["requisition_id"].ToString(); lbldate.Text = DateTime.Now.ToShortDateString(); }//end of postback cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); da = new SqlDataAdapter("select p.project_name, pr.status_by_emp,pr.user_id,pr.requisition_gen_date from mdx_purchase_requisition pr,mdx_projects p where requisition_id='" + lblformno.Text + "' and p.project_id=pr.project_id", cn); ds = new DataSet(); da.Fill(ds); foreach (DataRow dr in ds.Tables[0].Rows) { lblprojectid.Text = dr["project_name"].ToString(); lblaccepted_by_emp.Text = dr["status_by_emp"].ToString(); lblempname.Text = dr["user_id"].ToString(); lblordergendate.Text = dr["requisition_gen_date"].ToString(); }//end of foreach cmd3 = new SqlCommand("select top_user from mdx_emp_relations where user_id='" + lblaccepted_by_emp.Text + "'", cn); lblacepted_by_topuser.Text = (String)cmd3.ExecuteScalar(); }//end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else } //end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else } //end of try catch (Exception ex) { //Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString();; lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try { ///////////////Security//////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ///////////Security//////////// if (ck == true) { //Put user code to initialize the page here if (!IsPostBack) { fun.fnfill(ddlproject, "select project_id,project_name from mdx_projects where project_id in(select project_id from mdx_emp_project_assign where user_id='" + Session["AUserName"] + "')"); lblemp.Text = Session["AUserName"].ToString(); lblformno.Text = formautonumber(); bindgrid(); labeldate.Text = DateTime.Now.ToShortDateString(); lblformdate.Text = DateTime.Now.ToShortDateString(); int count = 10; if (ViewState["dt"] != null) { DataTable dt = (DataTable)ViewState["dt"]; bindgrid(count); } else { bindgrid(count); } } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } }//end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of pageload
protected void Page_Load(object sender, EventArgs e) { try { ///////////////Security//////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ///////////////Security//////////// if (ck == true) {//Put user code to initialize the page here if (!IsPostBack) { lblemp.Text = Session["AUserName"].ToString(); lblorderdate.Text = DateTime.Now.ToShortDateString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); cmd = new SqlCommand("select role_id from mdx_emp_relations where top_user='******' ", cn); int roleid = Convert.ToInt32(cmd.ExecuteScalar()); if (roleid == 1) { bindtopuser();//call the function to binding of the topuser details } else if (roleid == 2) { binddata(); } cn.Close(); } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if(Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } } catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of page load
protected void Page_Load(object sender, EventArgs e) { try {///////////security//////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {//////////security///////////////// if (!IsPostBack) { binddata(); lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); string str = Request.QueryString["sno"].ToString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); da = new SqlDataAdapter("select distinct sno,status,status_changed_by,user_id from mdx_daily_report_account_details where sno='" + str + "'", cn); ds = new DataSet(); da.Fill(ds, "mdx_daily_report_account_details"); foreach (DataRow dr in ds.Tables["mdx_daily_report_account_details"].Rows) { lblstatus.Text = dr["status"].ToString(); lblstatus_changedby.Text = dr["status_changed_by"].ToString(); lbluserid.Text = dr["user_id"].ToString(); } //end of foreach cn.Close(); } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else } //end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else } //end of try catch (Exception ex) { // Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //finally } //end of page load
protected void Page_Load(object sender, EventArgs e) { try { if (Session["AUserName"] != null) { /////////////////////////////////////////////////////Security/////////////// functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); /////////////////////////////////////////////////////Security/////////////// if (ck == true) { if (!IsPostBack) { //// Put user code to initialize the page here lblemp.Text = Session["AUserName"].ToString(); lbldate1.Text = DateTime.Now.ToShortDateString(); string str = Request.QueryString["car_id"].ToString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); cmd1 = new SqlCommand("select to_emp_id from mdx_cars where car_id='" + str + "'", cn); string stremp = (String)cmd1.ExecuteScalar(); lblempname.Text = stremp.ToString(); display(); } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else if(ck==true) } //end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } //end of else if (Session["AUserName"] != null) } //end of try catch (Exception ex) { lblerr_msg.Visible = true; lblerr_msg.Text = ex.Message.ToString(); }//end of catch finally { } }//end of page load
protected void Page_Load(object sender, EventArgs e) { try { ////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ////////////////////Security/////////////// if (ck == true) { // Put user code to initialize the page here if (!IsPostBack) { lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); fun.fnfill(ddlemp_grade, "select distinct grade_id,grade_name from mdx_employee_grade"); fun.fnfill(ddlemp_type, "select distinct employee_type_id,employee_type from mdx_employee_type"); fun.fnfill(ddldept_name, "select distinct dept_id,dept_name from mdx_departments where dept_name!='admin'"); //fun.fnfill(ddlrole, "select role_id,role_name from mdx_roles"); txtemp_id.Text = empautonum(); } //end of if(!IsPostBack) lblemp.Text = Session["AUserName"].ToString(); } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if(Session["User_Id"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else if(Session["User_Id"]!=null) } //end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; //Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try {//////////security/////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {//////////security/////////// if (!IsPostBack) { bindradiobtnlist(); lbldate.Text = DateTime.Now.ToShortDateString(); string str = Request.QueryString["requisition_id"].ToString(); binddata(); lblpuchaseorder_id.Text = autoordernumber(); lblrequisition_id.Text = str; lblemp.Text = Session["AUserName"].ToString(); //lblempname.Text = Session["AUserName"].ToString(); lblorderdate.Text = DateTime.Now.ToShortDateString(); //lblpending_code.Text = pendingcode(); } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of elase } //end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else } //end of try catch (Exception ex) { // Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try {/////////////security////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {////////////security////////// if (!IsPostBack) { binddata(); lblrequisition_id.Text = Request.QueryString["requisition_id"].ToString(); lblemp.Text = Session["AUserName"].ToString(); lbldate.Text = DateTime.Now.ToShortDateString(); lblpuchaseorder_id.Text = autoordernumber(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); cmd = new SqlCommand("select user_id from mdx_purchase_requisition where requisition_id='" + lblrequisition_id.Text + "'", cn); string struserid = (String)cmd.ExecuteScalar(); lblempname.Text = struserid; } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else } //end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else } //end of try catch (Exception ex) { //Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try { ///////// ////////////////////////////////////////////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); //// Put user code to initialize the page here if (ck == true) { if (!IsPostBack) { string orderid = Request.QueryString["order_id"].ToString(); display(); lbldate.Text = DateTime.Now.ToShortDateString(); lblformno.Text = orderid; ViewState["recp_id"] = receptautogennumber(); lblreceiptid.Text = ViewState["recp_id"].ToString(); lbldate.Text = DateTime.Now.ToShortDateString(); lblorderdate.Text = DateTime.Now.ToShortDateString(); bindrbtn(); } ////END OF IF(!ISPOSTBACK) lblemp.Text = Session["AUserName"].ToString(); } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } //end of else if (Session["AUserName"] != null) } //end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of page_load
protected void Page_Load(object sender, EventArgs e) { try { // ////////////////////Security/////////////// if (Session["AUserName"] != null) { // starting if (Session["AUserName"]) functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) { ////////////////////Security/////////////// // Put user code to initialize the page here if (!IsPostBack) { // start if statement binddata(); lblorderdate.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); } //end of if }//end of if(ck) else { Response.Redirect("../noprivilise.aspx"); } }//end of if(session["Ausername"]) else { Response.Redirect("../Default.aspx"); } } //end of try catch (Exception ex) { lblerr_msg.Visible = true; lblerr_msg.Text = ex.Message.ToString(); } finally { } }// end of page load
protected void Page_Load(object sender, EventArgs e) { try { ///////// ////////////////////////////////////////////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ///////// ////////////////////////////////////////////////////////////Security/////////////// if (ck == true) { // Put user code to initialize the page here if (!IsPostBack) { lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); lbldate.Text = DateTime.Now.ToShortDateString(); ViewState["rpt_id"] = rptautonum(); string rptid = ViewState["rpt_id"].ToString(); string rpt = rptautonum(); fun.fnfill(ddlclient1, "select client_id, client_name from mdx_clients where client_id in(select client_id from mdx_projects where project_id in(select project_id from mdx_tasks where assign_to='" + Session["AUserName"] + "'))"); } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); }//end of else if (Session["AUserName"] != null) } catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of page load
protected void Page_Load(object sender, EventArgs e) { ////////////////////Security/////////////// if (Session["AUserName"] != null) { try { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ////////////////////Security/////////////// if (ck == true) { // Put user code to initialize the page here if (!IsPostBack) {// // Put user code to initialize the page here fun.fnfill(ddlemp_grade, "select distinct grade_id,grade_name from mdx_employee_grade"); fun.fnfill(ddlemp_type, "select distinct employee_type_id,employee_type from mdx_employee_type"); txtemp_id.Text = empautonum();//call the empautonum() in the textbox lbldate.Text = DateTime.Now.ToShortDateString(); lblempname.Text = Session["AUserName"].ToString(); } //end of if (!ispostback) } //end of if (ck) else { Response.Redirect("../noprivilise.aspx"); } //end of else if (ck==true) } //end of try catch (Exception ex) { lblerr_msg.Visible = true; lblerr_msg.Text = ex.Message.ToString(); }//end of catch finally { } //end of finally } //end of if(Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } //end of else if(Session["AUserName"] != null) } //end of page load
protected void Page_Load(object sender, EventArgs e) { try { ///////////////Security//////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ///////////////Security//////////// if (ck == true) {//Put user code to initialize the page here if (!IsPostBack) { lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); txtdate.Value = DateTime.Now.ToShortDateString(); txtfrom_empname.Value = Session["AUserName"].ToString(); lblclient_name.Text = Session["clientname"].ToString(); lblproj_name.Text = Session["projectname"].ToString(); txtto_empname.Value = Session["toempname"].ToString(); } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } } catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of page load
protected void Page_Load(object sender, EventArgs e) { try { ////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ////////////////////Security/////////////// if (ck == true) { lblemp.Text = Session["AUserName"].ToString(); lbldate.Text = DateTime.Now.ToShortDateString(); string strempid = Request.QueryString["emp_id"].ToString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); cmd = new SqlCommand("select user_id from mdx_users where emp_id='" + strempid + "'", cn); string userid = (String)cmd.ExecuteScalar(); txtuname.Text = userid; } // end of if (ck == true) else { Response.Redirect("../noprivilise.aspx"); } } //end of if(Session["User_Id"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else if(Session["User_Id"]!=null) } catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { cn.Close(); cn.Dispose(); } //end of finally } //end of page load
protected void Page_Load(object sender, EventArgs e) { try { ////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ////////////////////Security/////////////// if (ck == true) { // Put user code to initialize the page here if (!IsPostBack) { // Put user code to initialize the page here lblemp.Text = Session["AUserName"].ToString(); lbldate1.Text = DateTime.Now.ToShortDateString(); binddata(); } //end of if(!IsPostBack) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if(Session["User_Id"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else if(Session["User_Id"]!=null) } catch (Exception ex) { //Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } //end of catch finally { } //end of finally } //end of page load
protected void Page_Load(object sender, EventArgs e) { try { ////////////////////////////////////////////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) { //// Put user code to initialize the page here if (!IsPostBack) { lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); fun.filllistbox(listemp, "select distinct user_id from mdx_emp_relations where top_user='******'"); fun.fnfill(ddlproject, "select distinct p.project_id,p.project_name from mdx_projects p,mdx_emp_relations r where p.project_id in(select project_id from mdx_emp_relations where top_user='******')"); txtdate.Text = DateTime.Now.ToShortDateString(); } //END OF IF(!ISPOSTBACK) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } //end of else if (Session["AUserName"] != null) } //end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of page load
protected void Page_Load(object sender, EventArgs e) { try { /////////security////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {///////////security/////////// //put user code to initialize the page if (!IsPostBack) { lblemp.Text = Session["AUserName"].ToString(); lbldate1.Text = DateTime.Now.ToShortDateString(); fun.fnfill(ddlclient, "select client_id,client_name from mdx_clients"); fun.fnfill(ddlprojtype, " select project_type_id,type_name from mdx_project_type"); } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } }//end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try {//////////security/////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {////////security///////////////// if (!IsPostBack) { lblemp.Text = Session["AUserName"].ToString(); lbldate1.Text = DateTime.Now.ToShortDateString(); display(); } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else } //end of if(session["AUserName"]!=null) else { Response.Redirect("../Default.aspx"); } //end of else } //end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try { ////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ////////////////////Security/////////////// if (ck == true) {// Put user code to initialize the page here if (!IsPostBack) { lblemp.Text = Session["AUserName"].ToString(); lbldate1.Text = DateTime.Now.ToShortDateString(); fun.fill(ddladmins, "select user_id from mdx_employees where dept_name='admin' and user_id!='superadmin' and status !=1"); fun.fnfilllistbox(listmodules, "select module_id,module_name from mdx_form_modules where module_id !=6"); } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else if(ck==true) } //end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } //end of else if (Session["AUserName"] != null) } //end of try catch (Exception ex) { lblerr_msg.Visible = true; lblerr_msg.Text = ex.Message.ToString(); }//end of catch finally { } //end of finally } //end of page load
protected void Page_Load(object sender, EventArgs e) { try { ///////// ////////////////////////////////////////////////////////////Security/////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); ///////// ////////////////////////////////////////////////////////////Security/////////////// if (ck == true) {// Put user code to initialize the page here if (!IsPostBack) { lblemp.Text = Session["AUserName"].ToString(); ViewState["sno"] = pretty_sno(); string str = ViewState["sno"].ToString(); bindgrid(); labeldate.Text = DateTime.Now.ToShortDateString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); int count = 5; if (ViewState["dt"] != null) { DataTable dt = (DataTable)ViewState["dt"]; bindgrid(count); } else { bindgrid(count); } } //end of if(!ispostback) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } }//end of if (Session["AUserName"] != null) else { Response.Redirect("../Default.aspx"); } }//end of try catch (Exception ex) { lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } finally { } }//end of pageload
protected void Page_Load(object sender, EventArgs e) { try {//////////////security////////////// if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) {////////security///////////// if (!IsPostBack) { //lbldate.Text = DateTime.Now.ToShortDateString(); string str = Request.QueryString["requisition_id"].ToString(); cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); cmd8 = new SqlCommand("select requisition_gen_date from mdx_purchase_requisition where requisition_id='" + str + "'", cn); string date = (String)cmd8.ExecuteScalar(); lbldate.Text = date; cmd7 = new SqlCommand("select user_id from mdx_purchase_requisition where requisition_id='" + str + "'", cn); string userid = (String)cmd7.ExecuteScalar(); lblempname.Text = userid; cmd4 = new SqlCommand("select count(*) from mdx_purchase_requisition_details where requisition_id='" + str + "' and status=1", cn); int strcount = Convert.ToInt32(cmd4.ExecuteScalar()); cmd4 = new SqlCommand("select count(*) from mdx_purchase_requisition_details where requisition_id='" + str + "' and status=3", cn); int str_rejected = Convert.ToInt32(cmd4.ExecuteScalar()); int num = strcount + str_rejected; cmd5 = new SqlCommand("select count(*) from mdx_purchase_requisition_details where requisition_id='" + str + "'", cn); int strcount1 = Convert.ToInt32(cmd5.ExecuteScalar()); if (num == strcount1) { cmd6 = new SqlCommand("update mdx_purchase_requisition set status='completed' where requisition_id='" + str + "'", cn); cmd6.ExecuteNonQuery(); }//end of if(num==strcount1) cn.Close(); binddata(); lblpuchaseorder_id.Text = autoordernumber(); lblrequisition_id.Text = str; lblemp.Text = Session["AUserName"].ToString(); //lblempname.Text = Session["AUserName"].ToString(); lblorderdate.Text = DateTime.Now.ToShortDateString(); } //end of postback } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } //end of else } //end of if(session["AUserName"]!=true) else { Response.Redirect("../Default.aspx"); } //end of else } //end if try catch (Exception ex) { //Response.Write("<script language='javascript'>alert('" + ex.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; }//end of catch finally { } //end of finally } //end of pageload
protected void Page_Load(object sender, EventArgs e) { try { // Put user code to initialize the page here if (!IsPostBack) { lbldate1.Text = DateTime.Now.ToShortDateString(); lblemp.Text = Session["AUserName"].ToString(); //fun.fnfill(DrpUserID, "select emp_id,user_id from mdx_users where user_id !='superadmin'"); fun.fnfill(DrpUserID, "select emp_id,user_id from mdx_employees where status!=1 and user_id !='superadmin'"); } //end of if(!IsPostBack) if (Session["AUserName"] != null) { functions ULC = new functions(); bool ck; string st1 = Request.PhysicalApplicationPath; string st2 = Request.PhysicalPath; string[] s = st2.Split(new char[] { '/', '\\' }); string st3 = s.GetValue(s.Length - 1).ToString(); ck = ULC.Check(st3, Session["AUserName"].ToString(), Session["AUserName"].ToString()); if (ck == true) { cn = new SqlConnection(ConfigurationManager.AppSettings["CMS"]); cn.Open(); da = new SqlDataAdapter("select distinct module_id,module_name from mdx_form_modules", cn); ds = new DataSet(); da.Fill(ds, "mdx_form_modules"); TblScrpPages.Width = 720; if (ds.Tables["mdx_form_modules"].Rows.Count >= 0) { int Num = 1; foreach (DataRow row in ds.Tables["mdx_form_modules"].Rows) { TableRow Trow = new TableRow(); Trow.BackColor = Color.Gray; Trow.ForeColor = Color.White; Trow.Font.Name = "Times New Roman"; Trow.Font.Size = 10; Trow.Font.Bold = true; Trow.Font.Underline = true; TableCell cell = new TableCell(); cell.Text = row["module_name"].ToString(); cell.Text = cell.Text.ToUpper(); Trow.Cells.Add(cell); TblScrpPages.Rows.Add(Trow); da1 = new SqlDataAdapter("select f.form_id,f.page_name,m.module_name from mdx_form_names f, mdx_form_modules m where f.module_id ='" + row["module_id"] + "' and f.module_id=m.module_id", cn); ds = new DataSet(); da1.Fill(ds, "mdx_form_names"); if (ds.Tables["mdx_form_names"].Rows.Count >= 0) { TableRow rw = new TableRow(); TableCell Tcell = new TableCell(); ChkLst = new CheckBoxList(); ChkLst.ID = Num.ToString(); ChkLst.Width = 720; ChkLst.RepeatDirection = RepeatDirection.Horizontal; ChkLst.RepeatColumns = 3; ChkLst.CellPadding = 1; ChkLst.CellSpacing = 1; ChkLst.BorderWidth = 1; ChkLst.CssClass = "chekBox"; ChkLst.DataSource = ds.Tables["mdx_form_names"]; ChkLst.DataTextField = "page_name"; ChkLst.DataValueField = "form_id"; ChkLst.DataBind(); Tcell.Controls.Add(ChkLst); rw.Cells.Add(Tcell); TblScrpPages.Rows.Add(rw); Num += 1; } //end of if (ds.Tables["mdx_form_names"].Rows.Count >= 0) ds.Clear(); } // end of foreach (DataRow row in ds.Tables["mdx_form_modules"].Rows) } //end of if (ds.Tables["mdx_form_modules"].Rows.Count >= 0) } //end of if(ck==true) else { Response.Redirect("../noprivilise.aspx"); } } //end of if(Session["User_Id"]!=null) else { Response.Redirect("Default.aspx"); } //end of else if(Session["User_Id"]!=null) } //end of try catch (Exception ex) { //Response.Write("<script language='javascript'>alert('" + oe.Message.ToString() + "' )</script>"); lblerr_msg.Text = ex.Message.ToString(); lblerr_msg.Visible = true; } //end of catch finally { } //end of finally } //end of page load