static private void AddResponseToTextBox(AddResponseParams Params) { // TrPosXMessageForm.ShowDialog(); AddResponseParams Arp = (AddResponseParams)Params; TrPosXMessageForm.UpdateMess(Arp.resStr + Environment.NewLine); if (GetParam("Approve", Arp.Response) == "Y") { TrPosXMessageForm.AddMess("Транзакция одобрена" + Environment.NewLine); } else { TrPosXMessageForm.AddMess("Транзакция ОТКЛОНЕНА" + Environment.NewLine); if (Arp.Response.Length > 2) { /* * TrPosXMessageForm.AddMess( * Encoding.GetEncoding(1251).GetString( * Encoding.GetEncoding(866).GetBytes(GetParam("VisualHostResponse", Arp.Response)))); * */ TrPosXMessageForm.AddMess("Причина: " + GetParam("VisualHostResponse", Arp.Response) + Environment.NewLine); } } if (Arp.Receipt != "") { Button1State = 1; TrPosXMessageForm.button1.Text = "Распечатать слип"; TrPosXMessageForm.button1.Visible = true; } else { Button1State = 2; TrPosXMessageForm.AddMess("Нет данных для печати" + Environment.NewLine); TrPosXMessageForm.button1.Text = "Закрыть"; TrPosXMessageForm.button1.Visible = true; } /* * textBox1.Text += "Main_RunOperationAsincComplited " + Environment.NewLine; * textBox1.Text += "res: " + Arp.res + Environment.NewLine; * textBox1.Text += "Response: " + Arp.Response + Environment.NewLine; * textBox1.Text += "Receipt: " + Arp.Receipt + Environment.NewLine; * */ }
static private void AddResponseToTextBox(AddResponseParams Params) { // TrPosXMessageForm.ShowDialog(); AddResponseParams Arp = (AddResponseParams)Params; TrPosXMessageForm.UpdateMess(Arp.resStr + Environment.NewLine); if (Arp.Receipt != "") { Button1State = 1; TrPosXMessageForm.button1.Text = "Распечатать слип"; TrPosXMessageForm.button1.Visible = true; } else { Button1State = 2; TrPosXMessageForm.AddMess("Нет данных для печати" + Environment.NewLine); TrPosXMessageForm.button1.Text = "Закрыть"; TrPosXMessageForm.button1.Visible = true; } }