예제 #1
0
        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();
        }