예제 #1
0
 /// <summary>
 /// Получение текстового предстваления для статуса документооборота
 /// </summary>
 /// <param name="statusDescription">статус документооборота</param>
 /// <returns></returns>
 private string GetStatusText(DocumentFlowStatusDescription statusDescription)
 {
     if (statusDescription != null)
     {
         var status = string.Format("Статус: {0}", statusDescription.Status);
         return string.IsNullOrWhiteSpace(statusDescription.AdditionalStatus)
             ? status
             : string.Format("{0}. Доп.статусы: {1}", status, statusDescription.AdditionalStatus);
     }
     return "(null)";
 }
예제 #2
0
        /// <summary>
        /// Получение текстового предстваления для статуса документооборота
        /// </summary>
        /// <param name="from"></param>
        /// <param name="status">>статус документооборота</param>
        /// <param name="statusDescription"></param>
        /// <returns></returns>
        private string GetStatusText(string from, DocumentFlowStatus status,
                                     DocumentFlowStatusDescription statusDescription)
        {
            if (statusDescription != null)
                return GetStatusText(statusDescription);

            var invoiceDocumentFlowStatus = status as InvoiceDocumentFlowStatus;
            if (invoiceDocumentFlowStatus != null)
                return _context.CurrentBox == from
                           ? invoiceDocumentFlowStatus.SellerFlow.ToString()
                           : invoiceDocumentFlowStatus.BuyerFlow.ToString();

            var untypedDocumentFlowStatus = status as UntypedDocumentFlowStatus;
            if (untypedDocumentFlowStatus != null)
                return untypedDocumentFlowStatus.SignStatus.ToString();

            return "(null)";
        }