internal static void ApplyBonusPayment(int ManagerId, int EmployeeId, int QueueId, int TableId, int CheckId, int TenderId, int PaymentId) { if ((TenderId == AlohaTender.CreditTenderIdIn) && (EmployeeId != iniFile.RemoteCloseEmployee)) { Utils.ToCardLog("Добавлена оплата бонусами. "); if (CheckId != ApplyBonusPaymentByCodeCheckId) { PDiscountCard.SV.CardEntryParams mCardEntryParams = new SV.CardEntryParams() { CheckId = CheckId, EntryId = PaymentId, TableId = TableId }; double Summ = AlohaTSClass.GetPaymentSumm(PaymentId); if (Summ == 0) { return; } SV.SVClass.StartSVPayment((decimal)Summ, CheckId, mCardEntryParams); } else { ApplyBonusPaymentByCodeCheckId = 0; } } }
public static void StartSVSale(decimal Summ, int CheckNum, CardEntryParams _CurentCardEntryParams) { try { CurentCardEntryParams = _CurentCardEntryParams; MainClass.AddRegCardSubscr(SVSistem.Main.GetCardFromMagReader); SVSistem.Main.StartSale(Summ, CheckNum, EndSVSale); } catch (Exception e) { Utils.ToCardLog("[Error] StartSVSale" + e.Message); } }
internal static void CheckAddBonusCard(int EmployeeId, int QueueId, int TableId, int CheckId, int EntryId) { if (iniFile.MySVEnabled) { double Pr = 0; int BarCode = AlohaTSClass.GetEntryBarCodeAndPrice(EntryId, out Pr); if (Loyalty.LoyaltyBasik.SVMyPresentCardBCs.Contains(BarCode)) { Utils.ToCardLog("Добавлена моя подарочная карта. Баркод " + BarCode); PDiscountCard.SV.CardEntryParams mCardEntryParams = new SV.CardEntryParams() { CheckId = CheckId, EntryId = EntryId, TableId = TableId }; SV.SVClass.StartSVSale((decimal)Pr, CheckId, mCardEntryParams); /* * * Thread myThread = new Thread(new ThreadStart( * (Action)delegate() * { * * * SV.SVClass.StartSVSale((decimal)Pr, mCardEntryParams); * }) * * ); * myThread.SetApartmentState(ApartmentState.STA); * myThread.Start(); * */ } } }