public void Calculate_MasterTrafficsControlPage(decimal PersonnelID, string CalculationDate)
    {
        string[] retMessage = new string[4];

        this.InitializeCulture();
        try
        {
            DailyReportProxy dailyReportProxy = this.TrafficsControlBusiness.GetPersonDailyReport(PersonnelID, CalculationDate);
            foreach (PropertyInfo pInfo in typeof(DailyReportProxy).GetProperties())
            {
                string pInfoName = pInfo.Name;
                if (GetLocalResourceObject(pInfo.Name) != null)
                {
                    pInfoName = GetLocalResourceObject(pInfoName).ToString();
                }
                string pInfoValue = pInfo.GetValue(dailyReportProxy, null).ToString();
                this.bulletedListCalculation_MasterTrafficsControl.Items.Add(" - " + pInfoName + " : " + pInfoValue);
            }
        }
        catch (UIValidationExceptions ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIValidationExceptions, ex, retMessage);
            this.ErrorHiddenField_CalculationResult.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
        catch (UIBaseException ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.UIBaseException, ex, retMessage);
            this.ErrorHiddenField_CalculationResult.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
        catch (Exception ex)
        {
            retMessage = this.exceptionHandler.HandleException(this.Page, ExceptionTypes.Exception, ex, retMessage);
            this.ErrorHiddenField_CalculationResult.Value = this.exceptionHandler.CreateErrorMessage(retMessage);
        }
    }
Ejemplo n.º 2
0
        public DailyReportProxy GetPersonDailyReport(decimal personId, string miladiDate)
        {
            try
            {
                DateTime dayDate = Utility.ToMildiDateTime(miladiDate);
                BPersonMonthlyWorkedTime monthlyReport = new BPersonMonthlyWorkedTime(personId);
                PersonalMonthlyReportRow row           = monthlyReport.GetPersonDailyReport(dayDate);

                DailyReportProxy proxy = new DailyReportProxy();
                proxy.AllowableOverTime        = row.AllowableOverTime;
                proxy.DailyAbsence             = row.DailyAbsence;
                proxy.DailyMission             = row.DailyMission;
                proxy.HourlyMeritoriouslyLeave = row.HourlyMeritoriouslyLeave;
                proxy.HourlyMission            = row.HourlyMission;
                proxy.HourlyPureOperation      = row.HourlyPureOperation;
                proxy.HourlySickLeave          = row.HourlySickLeave;
                proxy.HourlyUnallowableAbsence = row.HourlyUnallowableAbsence;
                proxy.HourlyWithoutPayLeave    = row.HourlyWithoutPayLeave;
                proxy.ShiftPairs = row.ShiftPairs;

                return(proxy);
            }
            catch (Exception ex)
            {
                LogException(ex, "BTraffic", "GetPersonDailyReport");
                throw ex;
            }
        }