static private void PrintSlip(string Slip) { if (iniFile.CreditCardSlipPrintPreCheck) { try { // string[] stringSeparators = new string[] { "\n\r", "\n\n", Environment.NewLine}; string[] stringSeparators = new string[] { "\n" }; string sres = Slip.Replace("\r", ""); AlohaTSClass.PrintCardSlip(sres.Split(stringSeparators, StringSplitOptions.None).ToList()); } catch (Exception e) { Utils.ToCardLog("Ошибка печати слипа " + e.Message); } } else { Slip += Convert.ToChar(31); ToShtrih.PrintCardCheck(Slip); } }
internal static void PrintCurentPrecheckOnFR() { try { Utils.ToCardLog("PrintCurentPrecheckOnFR "); int chId = (int)AlohaTSClass.GetCurentCheckId(); string s = AlohaTSClass.GetFRPredcheck(chId); ToShtrih.PrintCardCheck(s, false); } catch (Exception e) { Utils.ToCardLog("Error PrintCurentPrecheckOnFR " + e.Message); } }
static private void PrintSlip(string Slip) { if (iniFile.CreditCardSlipPrintPreCheck) { Utils.ToLog("PrintSlip CreditCardSlipPrintPreCheck "); try { // string[] stringSeparators = new string[] { "\n\r", "\n\n", Environment.NewLine}; string[] stringSeparators = new string[] { "\n" }; string sres = Slip.Replace("\r", ""); Convert.ToChar(31); List <string> LSlip = sres.Split(stringSeparators, StringSplitOptions.None).ToList(); List <string> LSlip1 = new List <string>(); foreach (string str in LSlip) { if (str.Contains(Convert.ToChar(31)) && str.Length < 3) { Utils.ToLog("PrintSlip Split and send"); if (LSlip1.Count() > 0) { AlohaTSClass.PrintCardSlip(LSlip1); LSlip1.Clear(); } } else { LSlip1.Add(str); } } if (LSlip1.Count() > 0) { AlohaTSClass.PrintCardSlip(LSlip1); LSlip1.Clear(); } //AlohaTSClass.PrintCardSlip(sres.Split(stringSeparators, StringSplitOptions.None).ToList()); } catch (Exception e) { Utils.ToCardLog("Ошибка печати слипа " + e.Message); } } else { Slip += Convert.ToChar(31); ToShtrih.PrintCardCheck(Slip); } }