String userName = ""; ///<network ID of user protected void Page_Load(object sender, EventArgs e) { this.userName = Page.User.Identity.Name.ToString().Substring(8); UtilityCashFlow utility = new UtilityCashFlow(this.userName); if (!utility.GetIsAdminUser() && !utility.GetIsCMUser()) { Response.Redirect(VariablesCashManager.NO_ACCESS_PAGE); } if (!Page.IsPostBack) { PopulateOfficeLocations(); } }
String userName = ""; ///<network ID of user protected void Page_Load(object sender, EventArgs e) { this.userName = Page.User.Identity.Name.ToString().Substring(8); //this.userName = "******"; UtilityCashFlow utility = new UtilityCashFlow(this.userName); if (!utility.GetIsAdminUser() && !utility.GetIsCMUser()) { Response.Redirect(VariablesCashManager.NO_ACCESS_PAGE); } if (!Page.IsPostBack) { LabelMessage.Text = ""; GetAmountToPay(); } }
String userName = ""; ///<network ID of user protected void Page_Load(object sender, EventArgs e) { this.userName = Page.User.Identity.Name.ToString().Substring(8); //this.userName = "******"; UtilityCashFlow utility = new UtilityCashFlow(this.userName); if ( !utility.GetIsAdminUser() && !utility.GetIsCMUser() ) { Response.Redirect(VariablesCashManager.NO_ACCESS_PAGE); } if (!Page.IsPostBack) { LabelMessage.Text = ""; GetAmountToPay(); } }
protected void Page_Load(object sender, EventArgs e) { this.userName = Page.User.Identity.Name.ToString().Substring(8); //this.userName = "******"; utility = new UtilityCashFlow(this.userName); SetUpUser(); TextBoxInvoiceNumber.Attributes.Add("onFocus", "TextBoxOnFocusAllToBlank('TextBoxInvoiceNumber')"); TextBoxVendorID.Attributes.Add("onFocus", "TextBoxOnFocusAllToBlank('TextBoxVendorID')"); TextBoxVendorName.Attributes.Add("onFocus", "TextBoxOnFocusAllToBlank('TextBoxVendorName')"); TextBoxBarcode.Attributes.Add("onFocus", "TextBoxOnFocusAllToBlank('TextBoxBarcode')"); if (!Page.IsPostBack) { bearCode.PopulateDepartments(CheckBoxListDepartments, VariablesCashManager.ERROR_LOG_FILE_NAME); SetUpUser(); PopulateOfficeLocations(); } }
protected void Page_Load(object sender, EventArgs e) { Page.MaintainScrollPositionOnPostBack = true; String userName = Page.User.Identity.Name.ToString().Substring(8); //userName = "******"; utility = new UtilityCashFlow(userName); SetUpUser(); int totalRows = 0; if (Request["loc"] != null) { utility.SetLocation(Request["loc"].ToString()); } if (Request["dept"] != null) { utility.SetDepartment(Request["dept"].ToString()); } try { totalRows = dataGridView.Rows.Count; } catch (SqlException sqle) { Logger.QuickLog(errorLogFileName, sqle.Message, "Page_Load()", "int totalRows = dataGridView.Rows.Count"); } if (utility.GetIsDeptUser()) { data.Attributes.Add("class", "cashManagerData cashManagerDataDept"); options.Attributes.Add("class", "optionsCashManagerDeptUser"); } else if (utility.GetIsCMUser()) { data.Attributes.Add("class", "cashManagerData cashManagerDataCM"); options.Attributes.Add("class", "optionsCashManagerCMUser"); } else { data.Attributes.Add("class", "cashManagerData cashManagerDataAdmin"); options.Attributes.Add("class", "optionsCashManagerAdminUser"); } utility.SetRowChanged(totalRows); hasPagerRow.Value = "false"; //Set Tool Tips buttonSave.Attributes.Add("onmouseover", "Tip('" + VariablesCashManager.TOOLTIP_SAVE_BUTTON + "')"); buttonSave.Attributes.Add("onmouseout", "UnTip()"); exitButton.Attributes.Add("onmouseout", "UnTip()"); if (utility.GetIsAdminUser() || utility.GetIsCMUser()) { AmountSelectedHidden.Value = Convert.ToString(GetTotalChecked()); if (Session["amountToPay"] != null) { AmountToPay.Value = Session["amountToPay"].ToString(); } else { AmountToPay.Value = "0"; } } else { divTotalToPay.Visible = false; buttonAdminOptions.Visible = false; } LabelCurrentPage.Text = "Page " + Convert.ToString(dataGridView.PageIndex + 1) + " of " + dataGridView.PageCount; if (!Page.IsPostBack) { LogUserAccess(); } }