예제 #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();
        }
 public void addRateSchedule(RateScheduleBO rateScheduleToAdd)
 {
     RateSchedules.Add(rateScheduleToAdd);
 }
예제 #3
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();
        }
예제 #4
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();
        }
예제 #5
0
 public void deleteRateSchedule(RateScheduleBO rateSchedule)
 {
     deleteRateSchedule(rateSchedule.ID);
 }
예제 #6
0
        public int updateRateSchedule(RateScheduleBO rateSchedule)
        {
            SqlParameter[] sqlParams = base.GetParameters("UpdateRateSched");

            if (rateSchedule.ID==0)
            {	sqlParams[fld_RateSchedSeqNum].Value = 0;	}
            else
            {	sqlParams[fld_RateSchedSeqNum].Value = rateSchedule.ID;	}

            sqlParams[fld_EffStartDate].Value = rateSchedule.Coverage.StartDate;
            sqlParams[fld_EffEndDate].Value = rateSchedule.Coverage.EndDate;

            sqlParams[fld_RateSchedName].Value = rateSchedule.RateScheduleName;
            sqlParams[fld_StatusTypeCode].Value = rateSchedule.Status;

            base.ExecuteUpdate("UpdateRateSched", sqlParams);

            rateSchedule.ID = Convert.ToInt16(sqlParams[fld_RateSchedSeqNum].Value);

            sqlParams = base.GetParameters("UpdateContrct_RateSched");

            sqlParams[fld_Contrct_RateSched_ContrctIDNum].Value = rateSchedule.ContractID;
            sqlParams[fld_Contrct_RateSched_RateSchedSeqNum].Value = rateSchedule.ID;

            base.ExecuteUpdate("UpdateContrct_RateSched", sqlParams);

            return rateSchedule.ID;
        }
예제 #7
0
 public int insertRateSchedule(RateScheduleBO rateSchedule)
 {
     return updateRateSchedule(rateSchedule);
 }
예제 #8
0
        public RateScheduleBO getRateScheduleWithoutRates(int rateScheduleID)
        {
            // Fill out Rate Schedule info

            SqlDataReader sqlDataRdr = base.GetDataReader("SELECT * FROM RateSched WHERE RateSchedSeqNum=" + rateScheduleID);

            RateScheduleBO rateSchedule = new RateScheduleBO();

            if (sqlDataRdr.Read())
            {
                rateSchedule.ID = rateScheduleID;
                rateSchedule.RateScheduleName = sqlDataRdr["RateSchedName"].ToString();
                rateSchedule.Status = sqlDataRdr["StatusTypeCode"].ToString();

                CoverageDAL coverageData = new CoverageDAL();
                rateSchedule.Coverage = coverageData.getRateScheduleCoverage(rateScheduleID);
            }

            return rateSchedule;
        }
        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();
        }