Exemplo n.º 1
0
 public static String StatusReplacement(string statusId)
 {
     if (BackendHelper.TagToValue("delivered_tickets_is_visible_for_client") == "true" && statusId == "12")
     {
         return("3");
     }
     return(statusId);
 }
Exemplo n.º 2
0
        public static String DeferredProcessedStatus(string statusId, string oldStatusId, string processedDate)
        {
            if (String.IsNullOrEmpty(processedDate))
            {
                return(statusId);
            }
            if (statusId != "5")
            {
                return(statusId);
            }
            var additionalProcessedTime = (0 - Convert.ToInt32(BackendHelper.TagToValue("interval_display_tickets_processed")));
            var defferedTime            = DateTime.Now.AddHours(additionalProcessedTime);
            var processedTime           = Convert.ToDateTime(processedDate);
            var resultDateDifаerence    = DateTime.Compare(defferedTime, processedTime);

            return(resultDateDifаerence >= 0 ? statusId : oldStatusId);
        }