public static string DetailReportOperation(string beginDate, string endDate) { int res = Cbposlib.GenerateReport(beginDate, endDate); if (res < 0) { MessageBox.Show(AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); return(res.ToString()); } string report = AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetReportPtr()); return(report); }
public static int GetResultAPI(int res) { if (res != 0) { if (res == -405) { MessageBox.Show(StringFromNativeUtf8(Cbposlib.getResponseStateCodeDescription()) + "\n" + ResultStateMessage(), "Ошибка"); return(1); } MessageBox.Show(StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); return(1); } return(0); }
public static int AfterOperation() { int result = 0; int res = Cbposlib.CloseTransaction(); if (res != 0) { result = 1; MessageBox.Show(AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); } res = Cbposlib.BPOSClean(); if (res != 0) { result = 1; MessageBox.Show(AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); } return(result); }
public static int BeforeOperation(string cardNum) { int result = 0; int res = Cbposlib.BPOSInit(); if (res != 0) { result = 1; MessageBox.Show(AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); } else { res = Cbposlib.CreateTransaction(cardNum, "TestEmployeeId"); if (res != 0) { result = 1; MessageBox.Show(AdditionalFunc.StringFromNativeUtf8(Cbposlib.GetErrorMessage(res)), "Ошибка"); } } return(result); }