Пример #1
0
        public CoverageForm(RMS_Controller in_RmsController)
        {
            InitializeComponent();	// Required for Windows Form Designer support

            rmsController = in_RmsController;

            data = new BaseDALObject();
            coverage = new CoverageDAL();

            //	Setup UI

            setupStatusComboBox();

            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            rateSchedule = rateScheduleData.getRateScheduleWithoutRates(rmsController.RateScheduleID);

            rateScheduleNameBx.Text = rateSchedule.RateScheduleName;
            startDateBx.Text = rateSchedule.Coverage.StartDate.ToString();
            endDateBx.Text = rateSchedule.Coverage.EndDate.ToString();

            for(int k=0; k<statusTypeComboBx.Items.Count; k++)
            {
                if (statusTypeComboBx.Items[k].ToString() == rateSchedule.Status)
                {	statusTypeComboBx.SelectedItem = statusTypeComboBx.Items[k];	}
            }

            //	Setup Entity List
            setupEntityListBox();
        }
        private RateScheduleBO getRateSchedule(string rateScheduleID)
        {
            RateScheduleDAL rateSchedDAL = new RateScheduleDAL();

            RateScheduleBO rateSchedule = rateSchedDAL.getRateSchedule(rateScheduleID);

            State["RateSchedule"] = rateSchedule;

            return rateSchedule;
        }
Пример #3
0
        public void deleteContract(ContractBO contract)
        {
            SqlParameter[] sqlParams;

            sqlParams = base.GetParameters("DeleteContrct_RateSched");

            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            for(int k=0; k<contract.rateScheduleCount(); k++)
            {
                sqlParams[fld_Contrct_RateSched_ContrctIDNum].Value = contract.ID;
                sqlParams[fld_Contrct_RateSched_RateSchedSeqNum].Value = ((RateScheduleStruct) contract.getRateScheduleAt(k)).ID;

                base.ExecuteDelete("DeleteContrct_RateSched", sqlParams);

                rateScheduleData.deleteRateSchedule(((RateScheduleStruct) contract.getRateScheduleAt(k)).ID);
            }

            sqlParams = base.GetParameters("DeleteContrctID");

              sqlParams[fld_ContrctIDNum].Value = contract.ID;

            base.ExecuteDelete("DeleteContrctID", sqlParams);
        }
Пример #4
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();
        }
Пример #5
0
        private void rateIncBtn_Click(object sender, System.EventArgs e)
        {
            BaseDALObject data = new BaseDALObject();
            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            RateScheduleBO rateSchedule = rateScheduleData.getRateSchedule(ref rmsController.CodesMngr, rmsController.RateScheduleID);
            if (adjustPOCsBx.Checked)
            {
                rateSchedule.Rates.increaseRatesByPercent(Convert.ToDouble(rateIncBx.Text), adjustPOCsBx.Checked, Convert.ToDouble(chgIncBx.Text));
            }
            else
            {
                rateSchedule.Rates.increaseRatesByPercent(Convert.ToDouble(rateIncBx.Text), adjustPOCsBx.Checked, 0);
            }

            rateScheduleData.updateRateSchedule(rateSchedule);
            rmsController.reloadRateSchedule();
        }
Пример #6
0
        private void setBtn_Click(object sender, System.EventArgs e)
        {
            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            RateScheduleBO rateSchedule = new RateScheduleBO();

            rateSchedule.ContractID = rmsController.ContractID;

            rateSchedule.Status = statusTypeCode;

            rateSchedule.RateScheduleName = rateScheduleNameBx.Text;
            rateSchedule.Coverage.StartDate = System.DateTime.Today;
            rateSchedule.Coverage.EndDate = System.DateTime.Today;

            rateScheduleData.insertRateSchedule(rateSchedule);

            RateScheduleAdded(this, EventArgs.Empty);

            this.Close();
        }
Пример #7
0
        // ********************************* REMOVE RATE SCHEDULE
        private void removeRateSchedulePicBx_Click(object sender, System.EventArgs e)
        {
            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            rateScheduleData.deleteRateSchedule(rmsController.RateScheduleID);

            loadContractsTreeView();
        }
        private void loadRateSchedule()
        {
            this.rateSchedulePanel.Controls.Clear();
            rateScheduleControlList = new ArrayList();

            RateScheduleDAL rateScheduleData = new RateScheduleDAL();

            rateSchedule = rateScheduleData.getRateSchedule(ref rmsController.CodesMngr, rmsController.RateScheduleID);

            titleLbl.Text = rateSchedule.RateScheduleName;

            loadCoverage();

            loadRate();

            loadControls();
        }