Beispiel #1
0
        protected override void pushData()
        {
            base.pushData();

            ClsStaffCost lcCost = (ClsStaffCost)_Cost;

            lcCost.StaffType = comboBoxStaffType.SelectedItem.ToString();
        }
Beispiel #2
0
        private void comboBoxStaffType_SelectedIndexChanged(object sender, EventArgs e)
        {
            var          selectedIndex = comboBoxStaffType.SelectedIndex;
            ClsStaffCost lcCost        = (ClsStaffCost)_Cost;

            lblAmountValue.Text = (selectedIndex == 0)
                ? Convert.ToString(200 * lcCost.NoOfDays)
                : (selectedIndex == 1)
                ? Convert.ToString(100 * lcCost.NoOfDays)
                : "";
        }
Beispiel #3
0
        protected override void updateDisplay()
        {
            base.updateDisplay();

            ClsStaffCost lcCost    = (ClsStaffCost)_Cost;
            var          StaffType = lcCost.StaffType;
            var          NoOfDays  = lcCost.NoOfDays;

            comboBoxStaffType.Text = StaffType;
            lblAmountValue.Text    = (StaffType == Constants.STAFF_TYPE_DRIVER)
                ? Convert.ToString(Convert.ToDecimal(200) * NoOfDays)
                :(StaffType == Constants.STAFF_TOUR_GUIDE)
                ? Convert.ToString(Convert.ToDecimal(100) * NoOfDays)
                : "";
        }
Beispiel #4
0
 private void ReUpdatingTourStaffCostList()
 {
     if (listViewTourCost.Items.Count > 0)
     {
         List <ClsCost> tourCostOldDetails = _Tour.TourCostList.Values.ToList <ClsCost>();
         decimal        TotalCost          = 0;
         foreach (ListViewItem item in listViewTourCost.Items)
         {
             if (STAFF == item.SubItems[1].Text)
             {
                 ClsStaffCost lcCost      = (ClsStaffCost)item.Tag;
                 var          NewDuration = (dateTimeEndDate.Value.Subtract(dateTimeStartDate.Value).Days.ToString());
                 var          NewNoOfDays = (NewDuration == "0") ? Convert.ToDecimal(1) : Convert.ToDecimal(NewDuration);
                 var          BasePriceAccordingToStaffType = (lcCost.StaffType == STAFF_TYPE_DRIVER) ? Convert.ToDecimal(200) : Convert.ToDecimal(100);
                 item.SubItems[2].Text = "$" + (NewNoOfDays * BasePriceAccordingToStaffType);
                 lcCost.NoOfDays       = NewNoOfDays;
             }
             TotalCost += Convert.ToDecimal(item.SubItems[2].Text.Remove(0, 1));
         }
         lblTotalCost.Text = Convert.ToString(TotalCost);
     }
 }