示例#1
0
        public string[] ReturnUpdatedConfigData_ToArray(Config_Information updatedConfigInfo)
        {
            List <string> result = new List <string>();

            result.Add(updatedConfigInfo.Express_SLA_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Express_Cutoff_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Express_SLA_Percentage_High.ToString());
            result.Add(updatedConfigInfo.Express_SLA_Percentage_Low.ToString());

            result.Add(updatedConfigInfo.International_SLA_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.International_Cutoff_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.International_SLA_Percentage_High.ToString());
            result.Add(updatedConfigInfo.International_SLA_Percentage_Low.ToString());

            result.Add(updatedConfigInfo.Standard_SLA_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Standard_Cutoff_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Standard_SLA_Percentage_High.ToString());
            result.Add(updatedConfigInfo.Standard_SLA_Percentage_Low.ToString());

            result.Add(updatedConfigInfo.Store_SLA_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Store_Cutoff_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Store_SLA_Percentage_High.ToString());
            result.Add(updatedConfigInfo.Store_SLA_Percentage_Low.ToString());

            result.Add(updatedConfigInfo.Weekend_Cutoff_Time.TimeOfDay.ToString());
            result.Add(updatedConfigInfo.Weekend_SLA_Time.TimeOfDay.ToString());

            result.Add(updatedConfigInfo.Admin_Accounts);

            return(result.ToArray());
        }
示例#2
0
        private bool CalculateSLAMet(Config_Information configInfo, Cleansed_SLA_Report_Details cleansedLine)
        {
            bool result = false;

            if (cleansedLine.Order_Number == "01004281015020000200")
            {
                result = false;
            }

            DateTime orderDate      = (cleansedLine.Released_Date.Year == 1 ? cleansedLine.Date_Imported : cleansedLine.Released_Date);
            DateTime shipDate       = (cleansedLine.Ship_Date.Year == 1 ? DateTime.Now.AddDays(1) : cleansedLine.Ship_Date);
            DateTime cutOffDeadline = CalculateCutOffTime(orderDate, configInfo, cleansedLine.Delivery_Option, cleansedLine.Ship_Method);
            DateTime slaDeadline    = CalculateSLATime(orderDate, configInfo, cleansedLine.Delivery_Option, cleansedLine.Ship_Method);

            if (orderDate > cutOffDeadline)
            {
                if (shipDate < slaDeadline.AddDays(1))
                {
                    result = true;
                }
            }
            else
            {
                if (shipDate < slaDeadline)
                {
                    result = true;
                }
            }

            return(result);
        }
示例#3
0
        private void Bind24HrDisplayData_ToForm(MainForm mainForm, IEnumerable <Cleansed_SLA_Report_Details> slaReportDetails)
        {
            Config_Information configInfo = dataHandler.GetConfigInformation();

            DisplayData  displayData = dataHandler.BindSLAData_ToDisplayData(slaReportDetails);
            List <Label> labels      = new List <Label>();

            #region Set top labels
            mainForm.lbl24HrsTotalSLADtlPct.Text         = displayData.TotalOrdersSLAPct.ToString();
            mainForm.lbl24HrsExpressSLADtlPct.Text       = displayData.ExpressOrdersSLAPct.ToString();
            mainForm.lbl24HrsInternationalSLADtlPct.Text = displayData.InternationalOrdersSLAPct.ToString();
            mainForm.lbl24HrsStandardSLADtlPct.Text      = displayData.StandardOrdersSLAPct.ToString();
            mainForm.lbl24HrsStoreSLADtlPct.Text         = displayData.StoreOrdersSLAPct.ToString();

            mainForm.gbLast24Hrs.Text = "Statistics from cut off point on " + DateTime.Now.AddDays(-1).ToLongDateString();

            labels.Add(mainForm.lbl24HrsStandardSLADtlPct);
            labels.Add(mainForm.lbl24HrsStoreSLADtlPct);
            labels.Add(mainForm.lbl24HrsInternationalSLADtlPct);
            labels.Add(mainForm.lbl24HrsTotalSLADtlPct);
            AssignColourCodedPct_ToLabels(labels, configInfo.Standard_SLA_Percentage_High, configInfo.Standard_SLA_Percentage_Low);

            labels.Clear();
            labels.Add(mainForm.lbl24HrsExpressSLADtlPct);
            AssignColourCodedPct_ToLabels(labels, configInfo.Express_SLA_Percentage_High, configInfo.Express_SLA_Percentage_Low);
            #endregion
        }
示例#4
0
        private void populateConfigInfo()
        {
            Config_Information configInfo = app.GetConfigInformation();

            tbExpressPctHigh.Text = configInfo.Express_SLA_Percentage_High.ToString();
            tbExpressPctLow.Text  = configInfo.Express_SLA_Percentage_Low.ToString();

            tbInternationalPctHigh.Text = configInfo.International_SLA_Percentage_High.ToString();
            tbInternationalPctLow.Text  = configInfo.International_SLA_Percentage_Low.ToString();

            tbStandardPctHigh.Text = configInfo.Standard_SLA_Percentage_High.ToString();
            tbStandardPctLow.Text  = configInfo.Standard_SLA_Percentage_Low.ToString();

            tbStorePctHigh.Text = configInfo.Store_SLA_Percentage_High.ToString();
            tbStorePctLow.Text  = configInfo.Store_SLA_Percentage_Low.ToString();


            dtpExpressCutOff.Value = configInfo.Express_Cutoff_Time;
            dtpExpressSLA.Value    = configInfo.Express_SLA_Time;

            dtpInternationalCutOff.Value = configInfo.International_Cutoff_Time;
            dtpInternationalSLA.Value    = configInfo.International_SLA_Time;

            dtpStandardCutOff.Value = configInfo.Standard_Cutoff_Time;
            dtpStandardSLA.Value    = configInfo.Standard_SLA_Time;

            dtpStoreCutOff.Value = configInfo.Store_Cutoff_Time;
            dtpStoreSLA.Value    = configInfo.Store_SLA_Time;

            dtpWeekendCutOff.Value = configInfo.Weekend_Cutoff_Time;
            dtpWeekendSLA.Value    = configInfo.Weekend_SLA_Time;

            lblAdminAccs.Text = configInfo.Admin_Accounts;
        }
示例#5
0
        public Config_Information GetConfigurationInformation()
        {
            rawConfigData = oracleRepository.GetRawConfigVariables();

            configInformation = dataAdapter.InterpretRawConfigData(rawConfigData);

            return(configInformation);
        }
示例#6
0
        public Config_Information GetConfigInformation()
        {
            Config_Information result = new Config_Information();

            result = performLookup.GetConfigurationInformation();

            return(result);
        }
示例#7
0
 public PerformLookup(IRepository oracleRepository, IAdaptData dataAdapter, IEnumerable <Cleansed_SLA_Report_Details> slaReportDetails, Config_Information configInformation, IEnumerable <Raw_Configuration_Data> rawConfigData)
 {
     this.oracleRepository  = oracleRepository;
     this.slaReportDetails  = slaReportDetails;
     this.configInformation = configInformation;
     this.dataAdapter       = dataAdapter;
     this.rawConfigData     = rawConfigData;
 }
示例#8
0
        private bool triggerSundayExpressRule(DateTime orderDate, Config_Information configInfo)
        {
            bool result = false;

            if (orderDate.DayOfWeek == DayOfWeek.Sunday && orderDate.TimeOfDay >= configInfo.Weekend_Cutoff_Time.TimeOfDay)
            {
                result = true;
            }

            return(result);
        }
示例#9
0
        public bool Return_AdminStatus_ToBool()
        {
            bool result = false;
            Config_Information configInfo = new Config_Information();

            configInfo = dataHandler.GetConfigInformation();

            if (configInfo.Admin_Accounts.Contains(Environment.UserName))
            {
                result = true;
            }

            return(result);
        }
示例#10
0
        public bool CheckForWeekend(DateTime date, Config_Information configInfo)
        {
            bool result = false;

            if (date.DayOfWeek == DayOfWeek.Friday && date.TimeOfDay >= configInfo.Express_Cutoff_Time.TimeOfDay)
            {
                result = true;
            }
            else if (date.DayOfWeek == DayOfWeek.Saturday)
            {
                result = true;
            }
            else if (date.DayOfWeek == DayOfWeek.Sunday && date.TimeOfDay <= configInfo.Weekend_Cutoff_Time.TimeOfDay)
            {
                result = true;
            }
            return(result);
        }
示例#11
0
        private DateTime CalculateSLATime(DateTime orderDate, Config_Information configInfo, string deliveryOption, string shipMethod)
        {
            DateTime result    = orderDate.Date;
            bool     isWeekend = CheckForWeekend(orderDate, configInfo);


            if (isWeekend)
            {
                result += configInfo.Weekend_SLA_Time.TimeOfDay;
            }
            else
            {
                if (deliveryOption == "Express")
                {
                    result += configInfo.Express_SLA_Time.TimeOfDay;
                    //Express delivery ordered on a Sunday before the weekday express SLA cut off time gets until Monday Express SLA time to complete
                    if (deliveryOption == "Express" && orderDate.DayOfWeek == DayOfWeek.Sunday && orderDate.TimeOfDay <= configInfo.Express_SLA_Time.TimeOfDay)
                    {
                        result = result.AddDays(1);
                    }
                }
                else
                {
                    switch (shipMethod)
                    {
                    case "Home":
                        result += configInfo.Standard_SLA_Time.TimeOfDay;
                        break;

                    case "Store":
                        result += configInfo.Store_SLA_Time.TimeOfDay;
                        break;

                    case "International":
                        result += configInfo.International_SLA_Time.TimeOfDay;
                        break;
                    }
                }
            }

            return(result);
        }
示例#12
0
        private DateTime CalculateCutOffTime(DateTime orderDate, Config_Information configInfo, string deliveryOption, string shipMethod)
        {
            DateTime result    = orderDate.Date;
            bool     isWeekend = CheckForWeekend(orderDate, configInfo);


            if (isWeekend)
            {
                result += configInfo.Weekend_Cutoff_Time.TimeOfDay;
            }
            else
            {
                if (deliveryOption == "Express")
                {
                    result += configInfo.Express_Cutoff_Time.TimeOfDay;

                    if (deliveryOption == "Express" && orderDate.DayOfWeek == DayOfWeek.Sunday && orderDate.TimeOfDay <= configInfo.Express_SLA_Time.TimeOfDay)
                    {
                        result = result.AddDays(1);
                    }
                }
                else
                {
                    switch (shipMethod)
                    {
                    case "Home":
                        result += configInfo.Standard_Cutoff_Time.TimeOfDay;
                        break;

                    case "Store":
                        result += configInfo.Store_Cutoff_Time.TimeOfDay;
                        break;

                    case "International":
                        result += configInfo.International_Cutoff_Time.TimeOfDay;
                        break;
                    }
                }
            }

            return(result);
        }
示例#13
0
        private void btnSaveChanges_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageBox.Show("Are you sure you wish to save changes?", "Save changes", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2);

            if (result == System.Windows.Forms.DialogResult.Yes)
            {
                Config_Information updatedConfigInto = new Config_Information();
                int expressHigh = 100, expressLow = 90;
                int internationalHigh = 90, internationalLow = 80;
                int standardHigh = 90, standardLow = 80;
                int storeHigh = 90, storeLow = 80;

                int.TryParse(tbExpressPctHigh.Text, out expressHigh);
                int.TryParse(tbExpressPctLow.Text, out expressLow);
                int.TryParse(tbInternationalPctHigh.Text, out internationalHigh);
                int.TryParse(tbInternationalPctLow.Text, out internationalLow);
                int.TryParse(tbStandardPctHigh.Text, out standardHigh);
                int.TryParse(tbStandardPctLow.Text, out standardLow);
                int.TryParse(tbStorePctHigh.Text, out storeHigh);
                int.TryParse(tbStorePctLow.Text, out storeLow);

                updatedConfigInto.Express_Cutoff_Time         = dtpExpressCutOff.Value;
                updatedConfigInto.Express_SLA_Time            = dtpExpressSLA.Value;
                updatedConfigInto.Express_SLA_Percentage_High = expressHigh;
                updatedConfigInto.Express_SLA_Percentage_Low  = expressLow;

                updatedConfigInto.International_Cutoff_Time         = dtpInternationalCutOff.Value;
                updatedConfigInto.International_SLA_Time            = dtpInternationalSLA.Value;
                updatedConfigInto.International_SLA_Percentage_High = internationalHigh;
                updatedConfigInto.International_SLA_Percentage_Low  = internationalLow;

                updatedConfigInto.Standard_Cutoff_Time         = dtpStandardCutOff.Value;
                updatedConfigInto.Standard_SLA_Time            = dtpStandardSLA.Value;
                updatedConfigInto.Standard_SLA_Percentage_High = standardHigh;
                updatedConfigInto.Standard_SLA_Percentage_Low  = standardLow;

                updatedConfigInto.Store_Cutoff_Time         = dtpStoreCutOff.Value;
                updatedConfigInto.Store_SLA_Time            = dtpStoreSLA.Value;
                updatedConfigInto.Store_SLA_Percentage_High = storeHigh;
                updatedConfigInto.Store_SLA_Percentage_Low  = storeLow;

                updatedConfigInto.Weekend_Cutoff_Time = dtpWeekendCutOff.Value;
                updatedConfigInto.Weekend_SLA_Time    = dtpWeekendSLA.Value;

                updatedConfigInto.Admin_Accounts = lblAdminAccs.Text;

                try
                {
                    app.UpdateConfigInformation(updatedConfigInto);
                }
                catch (Exception ex)
                {
                    logger.Error(ex.Message);
                    logger.Error(ex.StackTrace);
                }
                finally
                {
                    this.Close();
                }
            }
        }
示例#14
0
 public void UpdateConfigInformation(Config_Information configInfo)
 {
     string[] updatedConfigInfo = dataAdapter.ReturnUpdatedConfigData_ToArray(configInfo);
     oracleRepository.UpdateConfigInformation(updatedConfigInfo);
 }
示例#15
0
        public Config_Information InterpretRawConfigData(IEnumerable <Raw_Configuration_Data> _rawConfigData)
        {
            Config_Information result = new Config_Information();
            bool isnumeric;
            int  numeric = 66;

            foreach (var detail in _rawConfigData)
            {
                switch (detail.RECORDSUBTYPE)
                {
                    #region Set Administration Configs
                case "ADMINACCS":
                    result.Admin_Accounts = detail.DELIMITEDDATASTRING;
                    break;
                    #endregion

                    #region Set Express Configs
                case "EXPCUT":
                    result.Express_Cutoff_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "EXPSLA":
                    result.Express_SLA_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "EXPSLAPC1":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Express_SLA_Percentage_High = numeric;
                    break;

                case "EXPSLAPC2":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Express_SLA_Percentage_Low = numeric;
                    break;
                    #endregion

                    #region Set Express Configs
                case "INTCUT":
                    result.International_Cutoff_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "INTSLA":
                    result.International_SLA_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "INTSLAPC1":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.International_SLA_Percentage_High = numeric;
                    break;

                case "INTSLAPC2":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.International_SLA_Percentage_Low = numeric;
                    break;
                    #endregion

                    #region Set Standard Configs
                case "STDCUT":
                    result.Standard_Cutoff_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "STDSLA":
                    result.Standard_SLA_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "STDSLAPC1":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Standard_SLA_Percentage_High = numeric;
                    break;

                case "STDSLAPC2":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Standard_SLA_Percentage_Low = numeric;
                    break;
                    #endregion

                    #region Set Store Configs
                case "STRCUT":
                    result.Store_Cutoff_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "STRSLA":
                    result.Store_SLA_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "STRSLAPC1":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Store_SLA_Percentage_High = numeric;
                    break;

                case "STRSLAPC2":
                    isnumeric = int.TryParse(detail.DELIMITEDDATASTRING, out numeric);
                    result.Store_SLA_Percentage_Low = numeric;
                    break;
                    #endregion

                    #region Set Weekend Configs
                case "WKDCUT":
                    result.Weekend_Cutoff_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;

                case "WKDSLA":
                    result.Weekend_SLA_Time = Convert.ToDateTime(detail.DELIMITEDDATASTRING);
                    break;
                    #endregion

                default:
                    break;
                }
            }

            return(result);
        }
示例#16
0
 public void UpdateConfigInformation(Config_Information updatedConfigInfo)
 {
     dataHandler.UpdateConfigInformation(updatedConfigInfo);
 }
示例#17
0
        public IEnumerable <Cleansed_SLA_Report_Details> InterpretRawSLAData(IEnumerable <Raw_SLA_Report_Data> _rawSLAData, Config_Information configInfo)
        {
            List <Cleansed_SLA_Report_Details> list = new List <Cleansed_SLA_Report_Details>();
            Cleansed_SLA_Report_Details        cleansedLine;
            DateTime dateImported, dateReleased;

            foreach (var detail in _rawSLAData)
            {
                cleansedLine = new Cleansed_SLA_Report_Details();
                cleansedLine.Order_Number    = detail.ORDER_NUMBER;
                cleansedLine.Ship_Method     = detail.SHIP_METHOD;
                cleansedLine.Delivery_Option = (detail.DEL_OPTION == 1 ? "Express" : "Standard");
                cleansedLine.Date_Imported   = detail.DATE_IMPORTED;
                cleansedLine.Order_Date      = detail.ORDER_DATE;
                cleansedLine.Released_Date   = detail.RELEASE_DATE;
                cleansedLine.Ship_Date       = detail.SHIP_DATE;
                cleansedLine.SLA_Met         = CalculateSLAMet(configInfo, cleansedLine);

                dateImported = (detail.DATE_IMPORTED.Year == 1 ? DateTime.Now : detail.DATE_IMPORTED);
                dateReleased = (detail.RELEASE_DATE.Year == 1 ? DateTime.Now : detail.RELEASE_DATE);

                cleansedLine.Time_To_Import  = GetTimeDifference_ToTimeSpan(detail.ORDER_DATE, dateImported);
                cleansedLine.Time_To_Release = GetTimeDifference_ToTimeSpan(detail.DATE_IMPORTED, dateReleased);

                list.Add(cleansedLine);
            }

            IEnumerable <Cleansed_SLA_Report_Details> result = list;

            return(result);
        }
示例#18
0
        public IEnumerable <Cleansed_SLA_Report_Details> FilterCutOffTimes(IEnumerable <Cleansed_SLA_Report_Details> fullSLADetails, Config_Information configInfo, DateTime lastDate, DateTime toDate)
        {
            List <Cleansed_SLA_Report_Details> list = new List <Cleansed_SLA_Report_Details>();
            Cleansed_SLA_Report_Details        cleansedLine;

            DateTime fromCutOffTime = lastDate.Date;
            DateTime toCutOffTime   = toDate.Date;
            DateTime orderDate;
            bool     isExemptFromView = false;

            foreach (var detail in fullSLADetails)
            {
                fromCutOffTime   = lastDate.Date;
                toCutOffTime     = toDate.Date;
                isExemptFromView = false;

                if (detail.Order_Number == "3337681")
                {
                    fromCutOffTime.AddDays(0);
                }

                if (dataAdapter.CheckForWeekend(detail.Order_Date, configInfo))
                {
                    fromCutOffTime += configInfo.Weekend_Cutoff_Time.TimeOfDay;
                    toCutOffTime   += configInfo.Weekend_Cutoff_Time.TimeOfDay;
                }
                else if (detail.Delivery_Option == "Express")
                {
                    fromCutOffTime += configInfo.Express_Cutoff_Time.TimeOfDay;
                    toCutOffTime   += configInfo.Express_Cutoff_Time.TimeOfDay;

                    if (toCutOffTime.DayOfWeek == DayOfWeek.Sunday)
                    {
                        isExemptFromView = triggerSundayExpressRule(detail.Order_Date, configInfo);
                    }
                }
                else if (detail.Ship_Method == "Home")
                {
                    fromCutOffTime += configInfo.Standard_Cutoff_Time.TimeOfDay;
                    toCutOffTime   += configInfo.Standard_Cutoff_Time.TimeOfDay;
                }
                else if (detail.Ship_Method == "Store")
                {
                    fromCutOffTime += configInfo.Store_Cutoff_Time.TimeOfDay;
                    toCutOffTime   += configInfo.Store_Cutoff_Time.TimeOfDay;
                }
                else if (detail.Ship_Method == "International")
                {
                    fromCutOffTime += configInfo.International_Cutoff_Time.TimeOfDay;
                    toCutOffTime   += configInfo.International_Cutoff_Time.TimeOfDay;
                }

                orderDate = (detail.Released_Date.Year == 1 ? detail.Order_Date : detail.Released_Date);
                if ((detail.Released_Date.Year != 1) && (!detail.Order_Number.StartsWith("E") || !detail.Order_Number.StartsWith("R")))
                {
                    if ((orderDate >= fromCutOffTime) && (orderDate <= toCutOffTime) && !isExemptFromView)
                    {
                        cleansedLine = new Cleansed_SLA_Report_Details();
                        cleansedLine.Order_Number    = detail.Order_Number;
                        cleansedLine.Ship_Method     = detail.Ship_Method;
                        cleansedLine.Delivery_Option = detail.Delivery_Option;
                        cleansedLine.Date_Imported   = detail.Date_Imported;
                        cleansedLine.Order_Date      = detail.Order_Date;
                        cleansedLine.Released_Date   = detail.Released_Date;
                        cleansedLine.Ship_Date       = detail.Ship_Date;
                        cleansedLine.SLA_Met         = detail.SLA_Met;
                        cleansedLine.Time_To_Import  = detail.Time_To_Import;
                        cleansedLine.Time_To_Release = detail.Time_To_Release;

                        list.Add(cleansedLine);
                    }
                }
            }

            IEnumerable <Cleansed_SLA_Report_Details> result = list;

            return(result);
        }
示例#19
0
        private void BindCustomDisplayData_ToForm(MainForm mainForm, IEnumerable <Cleansed_SLA_Report_Details> slaReportDetails)
        {
            DisplayData        displayData          = dataHandler.BindSLAData_ToDisplayData(slaReportDetails);
            Config_Information configInfo           = dataHandler.GetConfigInformation();
            TimeSpan           totalOrderTimePeriod = (mainForm.dtpReportTo.Value - mainForm.dtpReportFrom.Value);

            #region Set Top Labels
            mainForm.lblCustTotalSLADtlPct.Text         = displayData.TotalOrdersSLAPct.ToString();
            mainForm.lblCustExpressSLADtlPct.Text       = displayData.ExpressOrdersSLAPct.ToString();
            mainForm.lblCustInternationalSLADtlPct.Text = displayData.InternationalOrdersSLAPct.ToString();
            mainForm.lblCustStandardSLADtlPct.Text      = displayData.StandardOrdersSLAPct.ToString();
            mainForm.lblCustStoreSLADtlPct.Text         = displayData.StoreOrdersSLAPct.ToString();

            mainForm.gbCustomSLAStats.Text = string.Format("{0:dd MMMM yyyy} - {1:dd MMMM yyyy}",
                                                           mainForm.dtpReportFrom.Value,
                                                           mainForm.dtpReportTo.Value);

            List <Label> labels = new List <Label>();
            labels.Add(mainForm.lblCustStandardSLADtlPct);
            labels.Add(mainForm.lblCustStoreSLADtlPct);
            labels.Add(mainForm.lblCustInternationalSLADtlPct);
            labels.Add(mainForm.lblCustTotalSLADtlPct);
            AssignColourCodedPct_ToLabels(labels, configInfo.Standard_SLA_Percentage_High, configInfo.Standard_SLA_Percentage_Low);

            labels.Clear();
            labels.Add(mainForm.lblCustExpressSLADtlPct);
            AssignColourCodedPct_ToLabels(labels, configInfo.Express_SLA_Percentage_High, configInfo.Express_SLA_Percentage_Low);

            mainForm.lblDGVHeader.Text = string.Format("{0:dd MMMM yy} - {1:dd MMMM yy}",
                                                       mainForm.dtpReportFrom.Value,
                                                       mainForm.dtpReportTo.Value);
            #endregion

            #region Set Side Labels
            mainForm.lblTotalOrdersDtl.Text       = displayData.TotalOrders.ToString();
            mainForm.lblTotalOrdersMetSLADtl.Text = displayData.TotalOrdersSLA.ToString();

            mainForm.lblExpressOrdersDtl.Text = displayData.ExpressOrders.ToString();
            mainForm.lblExpressMetSLADtl.Text = displayData.ExpressOrdersSLA.ToString();

            mainForm.lblInternationalOrdersDtl.Text       = displayData.InternationalOrders.ToString();
            mainForm.lblInternationalOrdersMetSLADtl.Text = displayData.InternationalOrdersSLA.ToString();

            mainForm.lblStandardOrdersDtl.Text       = displayData.StandardOrders.ToString();
            mainForm.lblStandardOrdersMetSLADtl.Text = displayData.StandardOrdersSLA.ToString();

            mainForm.lblStoreOrdersDtl.Text       = displayData.StoreOrders.ToString();
            mainForm.lblStoreOrdersMetSLADtl.Text = displayData.StoreOrdersSLA.ToString();
            #endregion

            #region Set Config Labels
            mainForm.lblTopCriteriaMetKey.Text = string.Format("> {0}% met SLA ({1}% for Express)",
                                                               configInfo.Standard_SLA_Percentage_High,
                                                               configInfo.Express_SLA_Percentage_High);
            mainForm.lblMidCriteriaMetKey.Text = string.Format("  {0}% to {1}% met SLA ({2}% to {3}% for Express)",
                                                               configInfo.Standard_SLA_Percentage_Low,
                                                               configInfo.Standard_SLA_Percentage_High,
                                                               configInfo.Express_SLA_Percentage_Low,
                                                               configInfo.Express_SLA_Percentage_High);
            mainForm.lblCriteriaNotMetKey.Text = string.Format("< {0}% met SLA ({1}% for Express)",
                                                               configInfo.Standard_SLA_Percentage_Low,
                                                               configInfo.Express_SLA_Percentage_Low);

            #endregion
        }
示例#20
0
 public void UpdateConfigInformation(Config_Information updatedConfigInfo)
 {
     performUpdate.UpdateConfigInformation(updatedConfigInfo);
 }
示例#21
0
 public IEnumerable <Cleansed_SLA_Report_Details> FilterCutOffTimes(IEnumerable <Cleansed_SLA_Report_Details> fullSLADetails, Config_Information configInfo, DateTime lastDate, DateTime toDate)
 {
     return(dataFilter.FilterCutOffTimes(fullSLADetails, configInfo, lastDate, toDate));
 }