protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("3")) { Response.Redirect("UserDashboard.aspx"); } ClsAdmin objadmin = new ClsAdmin(); objadmin.action = "select"; objadmin.companyId = Session["companyid"].ToString(); ds = objadmin.ManageSettings(); var ad_origin = new AddressData { Address = ds.Tables[0].Rows[0]["address"].ToString(), City = ds.Tables[0].Rows[0]["cityid"].ToString(), State = ds.Tables[0].Rows[0]["stateid"].ToString(), Country = ds.Tables[0].Rows[0]["countryid"].ToString(), Zip = ds.Tables[0].Rows[0]["zip"].ToString() }; Session["origin"] = ad_origin; hidaddress.Value = ad_origin.ToString(); fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { txtdescription.Attributes.Add("maxlength", "500"); txtleavedate.Attributes.Add("readonly", "readonly"); objgen.validatelogin(); if (!Page.IsPostBack) { txtleavedate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); if (!objda.checkUserInroles("17")) { Response.Redirect("UserDashboard.aspx"); } //If user have right to Approve Leaves of Employee if (objda.checkUserInroles("17")) { ViewState["add"] = "1"; } else { ViewState["add"] = null; } fillleavetype(); fillemployee(); } }
protected void Page_Load(object sender, EventArgs e) { DataAccess objda = new DataAccess(); GeneralMethod objgen = new GeneralMethod(); objgen.validatelogin(); if (!Page.IsPostBack) { System.Data.DataSet ds = new System.Data.DataSet(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); fillemployee(); fillclients(); if (Session["usertype"].ToString() != "Admin") { if (!objda.validatedRoles("5", ds) && !objda.validatedRoles("6", ds)) { Response.Redirect("UserDashboard.aspx"); } if (objda.validatedRoles("5", ds)) { ViewState["add"] = "1"; } else { ViewState["add"] = null; } } else { ViewState["add"] = "1"; } } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { if (!objda.checkUserInroles("84") && !objda.checkUserInroles("70")) { Response.Redirect("UserDashboard.aspx"); } txtfrmdate.Text = Convert.ToDateTime(GeneralMethod.getLocalDate()).AddDays(-7).ToString("MM/dd/yyyy"); txttodate.Text = GeneralMethod.getLocalDate(); if (Request.QueryString["report"] != null) { reportname.Text = Request.QueryString["report"].ToString(); } if (Request.QueryString["reportname"] != null) { reportname1.Text = Request.QueryString["reportname"].ToString(); } fillemployee(); fillclient(); fillproject(); fillmanager(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("10")) { lbtnaddnew.Visible = false; btnsubmit.Visible = false; chkavailableToLogin.Enabled = false; editimage.Visible = false; ViewState["add"] = null; cid.Visible = false; } else { ViewState["add"] = "1"; } if (Request.QueryString["id"] != null && Request.QueryString["id"].ToString() != "") { binddetail(Request.QueryString["id"].ToString()); } fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { if (!objda.checkUserInroles("22")) { Response.Redirect("UserDashboard.aspx"); } //if (objda.validatedRoles("22", ds)) //{ // ViewState["add"] = "1"; //} //else //{ // ViewState["add"] = null; //} fillyear(); fillemployee(); // searchdata(); } }
protected void Page_Load(object sender, EventArgs e) { //Check whether use is valid or not objGen.validatelogin(); if (!objda.checkUserInroles("36")) { Response.Redirect("UserDashboard.aspx"); } if (!Page.IsPostBack) { MultiView1.ActiveViewIndex = 0; fillemployee(); filldepartment(); fillmembers(); //Uncomment following code if you are redirecting from another page and want to navigate to specific user's directory //if (Request.QueryString["user"] != null && Request.QueryString["libraryid"] != null) //{ // ViewState["drive"] = "user"; // objuser.id = Request.QueryString["libraryid"].ToString(); // objuser.action = "select"; // ds = objuser.ManageEmployee(); // if (ds.Tables[0].Rows.Count > 0) // { // ViewState["driveid"] = ds.Tables[0].Rows[0]["nid"].ToString(); // ViewState["drivename"] = ds.Tables[0].Rows[0]["username"].ToString(); // bindgrid(); // } //} } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { txtfrmdate.Text = System.DateTime.Now.AddDays(-2).ToString("MM/dd/yyyy"); txttodate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); System.Data.DataSet ds = new System.Data.DataSet(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (Session["usertype"].ToString() != "Admin") { if (!objda.checkUserInroles("97")) { Response.Redirect("UserDashboard.aspx"); } } fillemployee(); fillclient(); fillproject(); fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { GeneralMethod objgen = new GeneralMethod(); objgen.validatelogin(); if (Session["usertype"].ToString() != "Admin") { Response.Redirect("UserDashboard.aspx"); } objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (objda.checkUserInroles("99")) { Dashboard_hidAddEvent.Value = "1"; } if (objda.checkUserInroles("100")) { Dashboard_hidAddPEvent.Value = "1"; } if (!IsPostBack) { bindlayer(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { txtfromdate.Text = "01/01/" + (DateTime.Now.Year).ToString() + ""; txttodate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); if (!objda.checkUserInroles("37")) { Response.Redirect("UserDashboard.aspx"); } if (objda.checkUserInroles("40")) { ViewState["edit"] = "1"; } else { ViewState["edit"] = null; } fillstate(); fillclient(); fillproject(); fillcurrency(); searchdata(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { txtfromdate.Text = System.DateTime.Now.AddDays(-2).ToString("MM/dd/yyyy"); txttodate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); System.Data.DataSet ds = new System.Data.DataSet(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (!objda.validatedRoles("44", ds)) { Response.Redirect("Dashboard.aspx"); } ViewState["add"] = "1"; ViewState["isadmin"] = "1"; fillemployee(); fillclient(); fillproject(); // fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { txtfromdate.Text = System.DateTime.Now.AddDays(-7).ToString("MM/dd/yyyy"); txttodate.Text = System.DateTime.Now.AddMonths(1).ToString("MM/dd/yyyy"); txtfromdate.Attributes.Add("readonly", "radonly"); txttodate.Attributes.Add("readonly", "radonly"); txtdescription.Attributes.Add("maxlength", "500"); txtleavedate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); if (objda.checkUserInroles("17")) { ViewState["add"] = "1"; if (Request.QueryString["RequestId"] != null && Request.QueryString["RequestId"].ToString() != "") { hidnid.Value = Request.QueryString["RequestId"].ToString(); } } else { ViewState["add"] = null; hidnid.Value = ""; } fillleavetype(); fillemployee(); fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { if (!objda.checkUserInroles("22")) { Response.Redirect("UserDashboard.aspx"); } //if (objda.validatedRoles("22", ds)) //{ // ViewState["add"] = "1"; //} //else //{ // ViewState["add"] = null; //} fillyear(); dropmonth.Text = System.DateTime.Now.Month.ToString(); searchdata(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { System.Data.DataSet ds = new System.Data.DataSet(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (!objda.validatedRoles("22", ds)) { Response.Redirect("Dashboard.aspx"); } //if (objda.validatedRoles("22", ds)) //{ // ViewState["add"] = "1"; //} //else //{ // ViewState["add"] = null; //} fillyear(); dropmonth.Text = System.DateTime.Now.Month.ToString(); searchdata(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (objda.validatedRoles("99", ds)) { Dashboard_hidAddEvent.Value = "1"; } if (objda.validatedRoles("100", ds)) { Dashboard_hidAddPEvent.Value = "1"; } if (!IsPostBack) { bindprojects(); // bindgradeschart(); bindlayer(); } // bindannouncement(); // bindschedules(); // //linktodaydate.Text = "Today date: " + GeneralMethod.getdatetime(); // Calendar1.TodaysDate = Convert.ToDateTime(GeneralMethod.getdatetime()); //} }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { txtfrom.Text = GeneralMethod.getEmpDate(); txtto.Text = DateTime.Now.AddDays(15).ToString("MM/dd/yyyy"); appointment_minDate.Value = txtfrom.Text; //role 9 indicates Approve Task if (!objda.checkUserInroles("108")) { Response.Redirect("UserDashboard.aspx"); } if (Request.QueryString["appointmentid"] != null) { obj.fromdate = ""; obj.todate = ""; obj.companyid = ""; obj.status = ""; obj.nid = Request.QueryString["appointmentid"].ToString(); obj.action = "select"; ds = obj.APP_ManageAppointment_new(); if (ds.Tables[0].Rows.Count > 0) { ScriptManager.RegisterStartupScript(this, GetType(), "key", "<script type='text/javascript'>openstatus(" + Request.QueryString["appointmentid"].ToString() + ");</script>", false); } } } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { filltaxyear(); fillusers(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { fillincome(); fillDeduction(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { filldepartment(); fillCategory(); fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { filldepartment(); fillemployee(); fillVendor(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("26")) { Response.Redirect("UserDashboard.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { //Role 21 indicates if (objda.checkUserInroles("21")) { ViewState["isadmin"] = "1"; } else { ViewState["isadmin"] = null; } fillyear(); fillemployee(); int month = System.DateTime.Now.Month - 1; int year = System.DateTime.Now.Year; dropmonthfrom.Text = month.ToString(); dropmonthto.Text = month.ToString(); dropyear.Text = year.ToString(); if (ViewState["isadmin"] != null && ViewState["isadmin"].ToString() == "1") { multiview1.ActiveViewIndex = 0; } else { hidmonthfrom.Value = dropmonthfrom.Text; hidmonthto.Value = dropmonthto.Text; hidyear.Value = dropyear.Text; string currentmonth = System.DateTime.Now.Month.ToString(); string currentyear = System.DateTime.Now.Year.ToString(); string startdate = currentmonth + "/" + "01/" + currentyear; DateTime stdate = Convert.ToDateTime(startdate); DateTime endate = stdate; //Get last date of month endate = endate.AddMonths(1); endate = endate.AddDays(-(endate.Day)); txtfromdate.Text = stdate.ToString("MM/dd/yyyy"); txttodate.Text = endate.ToString("MM/dd/yyyy"); hidstartdate.Value = txtfromdate.Text; hidenddate.Value = txttodate.Text; hidemployeeid.Value = dropemployee.Text; hidcurrentmode.Value = "empdetail"; multiview1.ActiveViewIndex = 1; lbtnback.Visible = false; } } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("1")) { Response.Redirect("UserDashboard.aspx"); } btndelete.Visible = false; fillgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("96")) { Response.Redirect("UserDashboard.aspx"); } filldepartment(); fillAsset(); fillCategory(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { if (Session["usertype"].ToString() == "Admin") { ViewState["view"] = "1"; ViewState["add"] = "1"; } else { System.Data.DataSet ds = new System.Data.DataSet(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); //if (!objda.validatedRoles("27", ds) && !objda.validatedRoles("28", ds)) //{ // Response.Redirect("UserDashboard.aspx"); //} if (!objda.validatedRoles("27", ds) && !objda.validatedRoles("28", ds)) { Response.Redirect("UserDashboard.aspx"); } if (objda.validatedRoles("28", ds)) { ViewState["view"] = "1"; } else { ViewState["view"] = null; } if (objda.validatedRoles("27", ds)) { ViewState["add"] = "1"; } else { liaddnew.Visible = false; ViewState["add"] = null; } } fillclient(); filladdclients(); filladdemployees(); searchdata(); } }
protected void Page_Load(object sender, EventArgs e) { DataAccess objda = new DataAccess(); GeneralMethod objgen = new GeneralMethod(); objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("2")) { Response.Redirect("UserDashboard.aspx"); } } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { if (!objda.checkUserInroles("24")) { Response.Redirect("UserDashboard.aspx"); } allcation_empid.Value = Session["userid"].ToString(); objda.id = Session["userid"].ToString(); ds = objda.getUserInRoles(); if (!objda.validatedRoles("24", ds)) { Response.Redirect("UserDashboard.aspx"); } if (objda.validatedRoles("24", ds)) { ViewState["add"] = "1"; } else { // liaddnew.Visible = false; ViewState["add"] = null; } //Check whether logged user have right for view Other's assigned tasks or not if (objda.validatedRoles("15", ds)) { ViewState["isadmin"] = "1"; } else { ViewState["isadmin"] = null; } txtdate.Text = System.DateTime.Now.ToString("MM/dd/yyyy"); filladdemployee(); fillmanager(); fillproject(); fillmenu(); divmsg.Visible = false; } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { //Role "1" indicates role to "Manage Master" //Here check whther user have this role, if not then redirect user to home page if (!objda.checkUserInroles("1")) { Response.Redirect("UserDashboard.aspx"); } bindgrid(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!Page.IsPostBack) { //role 9 indicates Approve Task if (!objda.checkUserInroles("113")) { Response.Redirect("UserDashboard.aspx"); } Session["importfile"] = null; fillimportcol(); } }
protected void Page_Load(object sender, EventArgs e) { objgen.validatelogin(); if (!IsPostBack) { if (!objda.checkUserInroles("72")) { Response.Redirect("UserDashboard.aspx"); } fillclient(); fillproject(); // fillmanager(); } }