Esempio n. 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 RateSchedule_Selection_Ctrl()
        {
            // This call is required by the Windows.Forms Form Designer.
            InitializeComponent();

            data = new BaseDALObject();

              DataSet oDataSet = data.GetDataSet("SELECT * FROM StatusType_View");

              statusTypeComboBx.DisplayMember = "StatusTypeDescr";
              statusTypeComboBx.ValueMember = "StatusTypeCode";
              statusTypeComboBx.DataSource = oDataSet.Tables[0];

            statusTypeComboBx.SelectedIndex=0;
        }
Esempio n. 3
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();
        }