private void LoadFunctions() { CostCenterFilter costCenterFilter = new CostCenterFilter(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER)); DataSet functionDS = costCenterFilter.SelectProcedure("SelectFunction"); cmbFunction.DataSource = functionDS; cmbFunction.DataMember = functionDS.Tables[0].ToString(); cmbFunction.DataValueField = "Id"; cmbFunction.DataTextField = "Name"; cmbFunction.DataBind(); }
private void LoadInergyLocationsFiltered(int countryId) { CostCenterFilter costCenterFilter = new CostCenterFilter(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER)); costCenterFilter.IdCountry = countryId; DataSet inergyLocationDS = costCenterFilter.SelectProcedure("SelectInergyLocation"); cmbInergyLocation.DataSource = inergyLocationDS; cmbInergyLocation.DataMember = inergyLocationDS.Tables[0].ToString(); cmbInergyLocation.DataValueField = "Id"; cmbInergyLocation.DataTextField = "Name"; cmbInergyLocation.DataBind(); }
private void LoadCostCentersFiltered(int countryId, int inergyLocationId, int functionId) { CostCenterFilter costCenterFilter = new CostCenterFilter(SessionManager.GetSessionValueNoRedirect(this, SessionStrings.CONNECTION_MANAGER)); costCenterFilter.IdCountry = countryId; costCenterFilter.IdInergyLocation = inergyLocationId; costCenterFilter.IdFunction = functionId; DataSet costCenterDS = costCenterFilter.SelectProcedure("SelectCostCenter"); cmbCostCenter.DataSource = costCenterDS; cmbCostCenter.DataMember = costCenterDS.Tables[0].ToString(); cmbCostCenter.DataValueField = "Id"; cmbCostCenter.DataTextField = "Code"; cmbCostCenter.DataBind(); }