Example #1
0
 public string PrintCheckToString(Sale[] Sales, string Uno, ResponsePrintCheck CheckInfo, bool CancelPayment, bool Copy)
 {
     string str = "";
     string[] strArray = this.TextToListLines(this.TextInHeader, 0);
     string[] strArray2 = this.TextToListLines(this.TextInCheckUp, 0);
     string[] strArray3 = this.TextToListLines(this.TextInCheckDown, 0);
     string[] strArray4 = this.TextToListLines(this.TextInTail, 0);
     string[] strArray5 = strArray;
     for (int i = 0; i < strArray5.Length; i = (int) (i + 1))
     {
         string str2 = strArray5[i];
         str = str + str2 + System.Environment.get_NewLine();
     }
     string[] strArray6 = strArray2;
     for (int j = 0; j < strArray6.Length; j = (int) (j + 1))
     {
         string str3 = strArray6[j];
         str = str + str3 + System.Environment.get_NewLine();
     }
     if (Copy)
     {
         str = str + "КОПИЯ" + System.Environment.get_NewLine();
     }
     string str6 = str + "ИНН: " + CheckInfo.INN + System.Environment.get_NewLine();
     str = (string.Concat((string[]) new string[] { str6, "Серийный N: ", CheckInfo.Serial.ToString(), "  N док: ", ((long) CheckInfo.Doc).ToString(), System.Environment.get_NewLine() }) + CheckInfo.Time.ToString("dd-MM-yyyy HH:mm", System.Globalization.CultureInfo.InvariantCulture) + System.Environment.get_NewLine()) + "Код операции: " + Uno + System.Environment.get_NewLine();
     Sale[] saleArray = Sales;
     for (int k = 0; k < saleArray.Length; k = (int) (k + 1))
     {
         Sale sale = saleArray[k];
         string str7 = str;
         str = string.Concat((string[]) new string[] { str7, sale.Name, ": ", this.SummToString(sale.Summa), System.Environment.get_NewLine() });
     }
     string[] strArray9 = strArray3;
     for (int m = 0; m < strArray9.Length; m = (int) (m + 1))
     {
         string str4 = strArray9[m];
         str = str + str4 + System.Environment.get_NewLine();
     }
     if (CheckInfo.SummCom != 0M)
     {
         str = str + "Комисcия: " + this.SummToString(CheckInfo.SummCom) + System.Environment.get_NewLine();
     }
     str = ((str + "Сумма: " + this.SummToString(CheckInfo.SummPay + CheckInfo.SummCom) + System.Environment.get_NewLine()) + "Кассир: " + this.OperatorName + System.Environment.get_NewLine()) + (CancelPayment ? ((string) "СТОРНИРОВАНИЕ") : ((string) "ОПЛАТА")) + System.Environment.get_NewLine();
     string[] strArray10 = strArray4;
     for (int n = 0; n < strArray10.Length; n = (int) (n + 1))
     {
         string str5 = strArray10[n];
         str = str + str5 + System.Environment.get_NewLine();
     }
     return str;
 }
Example #2
0
 public bool PrintSlipDoc(Sale[] Sales, string Uno, ResponsePrintCheck CheckInfo, bool CancelPayment)
 {
     int num = AzimuthWrapper.OpenFDoc();
     if (num != 0)
     {
         this.LastErrorMessage = num;
         return false;
     }
     num = AzimuthWrapper.SlipSelectFDoc();
     if (num != 0)
     {
         this.LastErrorMessage = num;
         AzimuthWrapper.CloseFDoc();
         return false;
     }
     string[] strArray2 = this.PrintCheckToString(Sales, Uno, CheckInfo, CancelPayment, true).Split((string[]) new string[] { System.Environment.get_NewLine() }, System.StringSplitOptions.None);
     for (int i = 0; i < strArray2.Length; i = (int) (i + 1))
     {
         string text = strArray2[i];
         num = this.PrintSlipLine(text, 0);
         if (num != 0)
         {
             this.LastErrorMessage = num;
             AzimuthWrapper.SlipEjectFDoc();
             AzimuthWrapper.CloseFDoc();
             return false;
         }
     }
     num = AzimuthWrapper.SlipEjectFDoc();
     if (num != 0)
     {
         this.LastErrorMessage = num;
         AzimuthWrapper.CloseFDoc();
         return false;
     }
     AzimuthWrapper.CloseFDoc();
     return true;
 }
Example #3
0
 public bool PrintCheck(bool slipDoc, decimal SummPay, decimal SummCom, out ResponsePrintCheck response)
 {
     int num;
     response = null;
     if (slipDoc)
     {
         num = AzimuthWrapper.PrintFiscalSlip();
     }
     else
     {
         num = AzimuthWrapper.PrintFiscalReceipt();
     }
     if (num == 0)
     {
         response = new ResponsePrintCheck();
         response.Time = System.DateTime.Now;
         response.Doc = this.LastCheckNumber = AzimuthWrapper.GetFldWord(5);
         response.SummPay = SummPay;
         response.SummCom = SummCom;
         response.Serial = this.GetSerial();
         return true;
     }
     this.LastErrorMessage = num;
     AzimuthWrapper.CloseFreeDoc();
     return false;
 }