void GetAllCostCentre() { CostCenter center=new CostCenter(); listCenter = center.GetAllCostCenter(_user.CompanyId); }
private void LoadCostCentreTable() { try { CostCenter costCenter=new CostCenter(); objCostCenterList = costCenter.GetAllCostCenter(_company.CompanyId); if (objCostCenterList.Count == 0) objCostCenterList.Add(new CostCenter()); RadGrid1.DataSource = objCostCenterList; RadGrid1.Rebind(); } catch (Exception ex) { Alert.Show(ex.Message); } }
private void LoadCostCenterDropDownList() { try { CostCenter aCost = new CostCenter(); List<CostCenter> costCenterList = aCost.GetAllCostCenter(_company.CompanyId); costCenterDropDownList.DataSource = costCenterList; costCenterDropDownList.DataTextField = "CostCenterName"; costCenterDropDownList.DataValueField = "CostCenterId"; costCenterDropDownList.DataBind(); } catch (Exception exp) { Alert.Show(exp.Message); } }