internal static bool RunOper(Check Ch, int LastTr, bool AllChecks, FiskInfo mfi, int PaymentId) { string inStr = ""; decimal Sum = 0; if (AllChecks) { foreach (Check Ch2 in Ch.ChecksOnTable) { if (Ch2.AlohaCheckNum != Ch.AlohaCheckNum) { AlohaTSClass.ApplyCardPayment(Ch2.AlohaCheckNum, Ch2.Summ); AlohaTSClass.SetPaymentAttr(Ch2.AlohaCheckNum, LastTr); } Sum += Ch2.Summ; } } else { Sum = Ch.Summ; } Utils.ToCardLog("Arcus Транзакция старт " + inStr); try { if (TrPosXMessageForm != null) { TrPosXMessageForm.Close(); } } catch (Exception e) { Utils.ToCardLog("[Error] При попытке закрыть старое окно. " + e.Message); try { TrPosXMessageForm.Dispose(); } catch {} } TrPosXMessageForm = new FTrposxRunComplited(); //Button1State = 0; TrPosXMessageForm.button2.Text = "Свернуть"; TrPosXMessageForm.button1.Visible = false; TrPosXMessageForm.button2.Visible = true; TrPosXMessageForm.button3.Visible = false; TrPosXMessageForm.Init("Операция на терминале пластиковых карт.", ""); TrPosXMessageForm.button1.Click += new EventHandler(button1_Click); TrPosXMessageForm.button2.Click += new EventHandler(button2_Click); //TrPosXClass.RunOperationAsinc(inStr); if (!Ch.Vozvr) { ArcusClass.RunPaymentAsinc(Sum); } else { ArcusClass.RunVozvrAsinc(Sum); } TrPosXMessageForm.TopMost = true; TrPosXMessageForm.Show(); return(true); }
static private void CloseForm() { TrPosXMessageForm.Close(); }