public DataTable getRateSchedules(string contractID) { ContractDAL myContractDAL = new ContractDAL(); RateSchedule_Collection myRateSchedules = myContractDAL.getRateSchedulesForContract(contractID); return myRateSchedules.toDataTable(); }
public DataTable getContracts(string statusTypeCode) { ContractDAL myContractDAL = new ContractDAL(); Contract_Collection myContract_Collection = myContractDAL.getContractsByStatusType(statusTypeCode); return myContract_Collection.ToDataTable(); }
private void setBtn_Click(object sender, System.EventArgs e) { ContractBO newContract = new ContractBO(); newContract.ContractName = contractNameBx.Text; ContractDAL contractData = new ContractDAL(); int contractID = contractData.insertContract(newContract); RateScheduleBO rateSchedule = new RateScheduleBO(); rateSchedule.ContractID = contractID; rateSchedule.RateScheduleName = contractNameBx.Text; rateSchedule.Coverage.StartDate = System.DateTime.Today; rateSchedule.Coverage.EndDate = System.DateTime.Today; // Add by default to Development rateSchedule.Status = "3"; RateScheduleDAL rateScheduleData = new RateScheduleDAL(); rateScheduleData.insertRateSchedule(rateSchedule); ContractAdded(this, EventArgs.Empty); this.Close(); }
// ********************************* REMOVE CONTRACT private void removeContractPicBx_Click(object sender, System.EventArgs e) { ContractDAL contractData = new ContractDAL(); ContractBO contract = contractData.getContract(rmsController.ContractID); contractData.deleteContract(contract); loadContractsTreeView(); }
private void loadContractsTreeView() { contractsTree.Nodes.Clear(); ContractDAL contractData = new ContractDAL(); Contract_Collection contracts = contractData.getContractsByStatusType(statusTypeComboBx.SelectedValue.ToString()); ContractBO contract; TreeNode contractNode, rateScheduleNode; for(int c=0; c<contracts.Count(); c++) { contract = contracts.getContractAt(c); contractNode = new TreeNode(contract.ToString()); for(int r=0; r<contract.rateScheduleCount(); r++) { rateScheduleNode = new TreeNode(contract.getRateScheduleStringAt(r)); contractNode.Nodes.Add(rateScheduleNode); } contractsTree.Nodes.Add(contractNode); } contractsTree.SelectedNode = contractsTree.Nodes[0]; }