protected void btnSearch_Click(object sender, EventArgs e) { try { objContractAward = new ContractAwardDetails(); lblSelectionError.Text = string.Empty; if (drpLoanNumber.SelectedIndex > 0 || drpAgency.SelectedIndex > 0 || drpState.SelectedIndex > 0 || drpYear.SelectedIndex > 0 || drpSector.SelectedIndex > 0) { ds = new DataSet(); loanID = Convert.ToInt32(drpLoanNumber.SelectedValue); yearID = Convert.ToInt32(drpYear.SelectedValue); agencyID = Convert.ToInt32(drpAgency.SelectedValue); sector = drpSector.SelectedItem.Text; state = drpState.SelectedItem.Text; ds = objContractAward.ContractAwardFilterMonthWise(loanID, yearID, agencyID, state, sector); grdContractAward.DataSource = null; grdContractAward.DataSource = ds; grdContractAward.DataBind(); Session[clsConstant.SESS_TABLE] = ds.Tables[0]; } else { lblSelectionError.Text = "Please select some criteria"; lblSelectionError.ForeColor = Color.Red; } } catch (Exception ex) { logger.Error(ex); } }
protected void Page_Load(object sender, EventArgs e) { try { contractAwardDetailsObj = new ContractAwardDetails(); dataset = new DataSet(); contractAwardID = Request.QueryString[clsConstant.SESS_CONTRACTAWARDID]; if (!IsPostBack) { if (Session[clsConstant.TOKEN] == null) { UrlParameterPasser urlWrapper = new UrlParameterPasser(); urlWrapper["pageaccesserr"] = "1"; urlWrapper.Url = "../Logout.aspx"; urlWrapper.PassParameters(); } if (Utility.CheckAccess("ContractAwardDetailsAddEditMonth") == false) { UrlParameterPasser urlWrapper = new UrlParameterPasser(); urlWrapper["pageaccesserr"] = "1"; urlWrapper.Url = "../DocumentLogSystem/DashBoard.aspx"; urlWrapper.PassParameters(); } //if ((((UserDetails)Session[clsConstant.TOKEN]).UserID) != 1031) //{ // this.MakeReadOnly(this.Controls); //} if (!Convert.ToBoolean(Session[clsConstant.SESS_VIEWTYPE])) { this.MakeReadOnly(this.Controls); } if (contractAwardID != null && IsPostBack == false) { BindLoanYear(); dataset = contractAwardDetailsObj.GetContractAwardMonthWise(Convert.ToInt32(contractAwardID)); FillTextBoxes(dataset); btnSubmit.Visible = false; btnUpdate.Visible = true; lnkProjBriefSheet.Visible = true; } if (contractAwardID == null && IsPostBack == false) { BindLoanYear(); btnUpdate.Visible = false; btnSubmit.Visible = true; } } } catch (Exception ex) { logger.Error(ex); } }
protected void GridViewBind() { dt = new DataTable(); objContractAward = new ContractAwardDetails(); ds = objContractAward.BindGridMonthwise(); dt = ds.Tables[0]; grdContractAward.DataSource = dt; grdContractAward.DataBind(); Session[clsConstant.SESS_TABLE] = dt; CallToPerformanceTrack(ds.Tables[1], "ContractAward By Month"); }
protected void Page_Load(object sender, EventArgs e) { try { if (IsPostBack) { Preview.Style.Add("display", "none"); } if (!IsPostBack) { if (Session[clsConstant.TOKEN] == null) { UrlParameterPasser urlWrapper = new UrlParameterPasser(); urlWrapper["pageaccesserr"] = "1"; urlWrapper.Url = "../Logout.aspx"; urlWrapper.PassParameters(); } if (Utility.CheckAccess("ContractAwardDetailsListMonth") == false) { pnlInvalid.Visible = true; MainDiv.Visible = false; } objContractAward = new ContractAwardDetails(); comnFunctionObj = new CommonFunction(); if (IsPostBack != true) { ds = new DataSet(); drpLoanNumber.DataSource = comnFunctionObj.getDropDownList(clsConstant.SP_GET_LOAN, null); drpLoanNumber.DataTextField = "DisplayFieldText"; drpLoanNumber.DataValueField = "ValueFieldText"; drpLoanNumber.DataBind(); drpLoanNumber.Items.RemoveAt(0); drpLoanNumber.Items.Insert(0, new ListItem("----------ENTER NAME/NO----------", "0")); drpYear.DataSource = comnFunctionObj.getDropDownList(clsConstant.SP_GET_YEAR, null); drpYear.DataTextField = "DisplayFieldText"; drpYear.DataValueField = "ValueFieldText"; drpYear.DataBind(); drpAgency.DataSource = comnFunctionObj.getDropDownList(clsConstant.SP_GET_AGENCY, null); drpAgency.DataTextField = "DisplayFieldText"; drpAgency.DataValueField = "ValueFieldText"; drpAgency.DataBind(); drpState.DataSource = comnFunctionObj.getDropDownList(clsConstant.SP_GET_AGENCY_BY_STATE, null); drpState.DataTextField = "DisplayFieldText"; drpState.DataValueField = "ValueFieldText"; drpState.DataBind(); drpSector.DataSource = comnFunctionObj.getDropDownList(clsConstant.SP_GET_DOC_CATEGORY, null); drpSector.DataTextField = "DisplayFieldText"; drpSector.DataValueField = "ValueFieldText"; drpSector.DataBind(); drpState.SelectedIndex = 0; drpState.Enabled = false; drpAgency.SelectedIndex = 0; drpAgency.Enabled = false; drpSector.SelectedIndex = 0; drpSector.Enabled = false; GridViewBind(); } } } catch (Exception ex) { logger.Error(ex); } finally { } }