예제 #1
0
    protected String CalcTotalPerDiem(int billingRatePerDiemCount)
    {
        var timeBillingCityRateJoinController = new TimesheetBillingCityRateJoinController();
        var cityPerdiemTotal = timeBillingCityRateJoinController.CityPerDiemRateGrandTotalByTimesheetId(TimesheetID);
        var perdiemIfNotCities = _controller.PerDiemRateByID(TimesheetID) * billingRatePerDiemCount;//no cities BillingRate Per Diem
        var perdiemTotalForDisplay = perdiemIfNotCities; 

        if (cityPerdiemTotal > 0)
            perdiemTotalForDisplay = cityPerdiemTotal;

        return string.Format("{0:C}", perdiemTotalForDisplay);
    }
예제 #2
0
        protected String GetPerDiemGrandTotal(int count, Double rate, int timesheetId)
        {
            var timeBillingCityRateJoinController = new TimesheetBillingCityRateJoinController();
            var cityPerdiemTotal = timeBillingCityRateJoinController.CityPerDiemRateGrandTotalByTimesheetId(timesheetId);
            var perdiemIfNoCities = count * rate; ;//no cities BillingRate Per Diem

            return cityPerdiemTotal > 0 ? cityPerdiemTotal.ToString() : perdiemIfNoCities.ToString();
        }