protected void Page_Load(object sender, EventArgs e) { try { Response.Cookies[Constants.ScreenName].Value = "Due DT Invoice Report"; if (!IsPostBack) { ClearFields(); DataSet ds = new DataSet(); string sRoleName = Request.Cookies[Constants.UserRoleName].Value.ToString(); string sCompanyCode = Request.Cookies[Constants.CompanyCode].Value.ToString(); ds = oLogin.GetCompanyBasedOnUserRole(sRoleName, sCompanyCode); ddlFromCompany.DataSource = ds; ddlFromCompany.DataTextField = "Name"; ddlFromCompany.DataValueField = "Code"; ddlFromCompany.DataBind(); ddlToCompany.DataSource = ds; ddlToCompany.DataTextField = "Name"; ddlToCompany.DataValueField = "Code"; ddlToCompany.DataBind(); } } catch (Exception ex) { lblerror.Visible = true; lblerror.Text = ex.Message.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { try { Response.Cookies[Constants.ScreenName].Value = "No Active Files Report"; if (!IsPostBack) { ddlFilterBy.Items.Insert(0, new ListItem("-- Select --", "-- Select --")); ddlFilterBy.Items.Insert(1, new ListItem("Branch", "Branch")); ddlFilterBy.Items.Insert(2, new ListItem("ClaimHandler", "ClaimHandler")); ddlFilterBy.SelectedIndex = 0; string sRoleName = Request.Cookies[Constants.UserRoleName].Value.ToString(); string sCompanyCode = Request.Cookies[Constants.CompanyCode].Value.ToString(); DataSet ds = oLogin.GetCompanyBasedOnUserRole(sRoleName, sCompanyCode); ddlBranch.DataSource = ds; ddlBranch.DataTextField = "Name"; ddlBranch.DataValueField = "Code"; ddlBranch.DataBind(); DataSet dsClaimHandler = oReports.GetClaimHandler(); ddlClaimHandler.DataSource = dsClaimHandler; ddlClaimHandler.DataTextField = "Name"; ddlClaimHandler.DataValueField = "Name"; ddlClaimHandler.DataBind(); ClearFields(); } } catch (Exception ex) { lblerror.Visible = true; lblerror.Text = ex.Message.ToString(); } }
private void LoadDropDowns() { try { DataSet dsClaimHandler = oReports.GetClaimHandler(); ddlFromClaimHandler.DataSource = dsClaimHandler; ddlFromClaimHandler.DataTextField = "Name"; ddlFromClaimHandler.DataValueField = "Code"; ddlFromClaimHandler.DataBind(); ddlToClaimHandler.DataSource = dsClaimHandler; ddlToClaimHandler.DataTextField = "Name"; ddlToClaimHandler.DataValueField = "Code"; ddlToClaimHandler.DataBind(); DataSet dsCompany = new DataSet(); string sRoleName = Request.Cookies[Constants.UserRoleName].Value.ToString(); string sCompanyCode = Request.Cookies[Constants.CompanyCode].Value.ToString(); dsCompany = oLogin.GetCompanyBasedOnUserRole(sRoleName, sCompanyCode); ddlFromCompany.DataSource = dsCompany; ddlFromCompany.DataTextField = "Name"; ddlFromCompany.DataValueField = "Code"; ddlFromCompany.DataBind(); ddlToCompany.DataSource = dsCompany; ddlToCompany.DataTextField = "Name"; ddlToCompany.DataValueField = "Code"; ddlToCompany.DataBind(); ddlStatus.DataSource = oReports.GetReportStatus(); ddlStatus.DataTextField = "Name"; ddlStatus.DataValueField = "Code"; ddlStatus.DataBind(); } catch (Exception ex) { lblerror.Visible = true; lblerror.Text = ex.Message.ToString(); } }