//BarCode void _buttonKeyBarCode_Clicked(object sender, EventArgs e) { string fileWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_window_input_text_barcode.png"); logicpos.Utils.ResponseText dialogResponse = Utils.GetInputText(_sourceWindow, DialogFlags.Modal, fileWindowIcon, Resx.global_barcode, string.Empty, SettingsApp.RegexInteger, true); if (dialogResponse.ResponseType == ResponseType.Ok) { InsertOrUpdate(dialogResponse.Text); } }
//IN009279 CardCode scanner void _buttonKeyCardCode_Clicked(object sender, EventArgs e) { string fileWindowIcon = FrameworkUtils.OSSlash(GlobalFramework.Path["images"] + @"Icons\Windows\icon_pos_ticketpad_card_entry.png"); logicpos.Utils.ResponseText dialogResponse = Utils.GetInputText(_sourceWindow, DialogFlags.Modal, fileWindowIcon, resources.CustomResources.GetCustomResources(GlobalFramework.Settings["customCultureResourceDefinition"], "global_cardcode_small"), string.Empty, SettingsApp.RegexInteger, true); if (dialogResponse.ResponseType == ResponseType.Ok) { if (GlobalFramework.AppUseParkingTicketModule) /* IN009239 */ { GlobalApp.ParkingTicket.GetTicketDetailFromWS(dialogResponse.Text); } else { InsertOrUpdate(dialogResponse.Text); } } }
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //Shared UI Helper to Request Selected Terminals to send to ProcessFinanceDocumentSeries (Framework) public static bool UICreateDocumentFinanceYearSeriesTerminal(Window pSourceWindow, FIN_DocumentFinanceYears pDocumentFinanceYear) { bool result = false; try { //Refresh Terminal XPO Object XPCollection xpcConfigurationPlaceTerminal = new XPCollection(GlobalFramework.SessionXpo, typeof(POS_ConfigurationPlaceTerminal)); xpcConfigurationPlaceTerminal.Reload(); //Get Terminals DataTable dataTableSelectedTerminals = PosSelectRecordDialog <DataTable, DataRow, TreeViewTerminalSeries> .GetSelected(pSourceWindow); //Store Reference to BackOffice TreeViewDocumentFinanceYearSerieTerminal TreeViewDocumentFinanceSeries treeViewDocumentFinanceSeries = ((pSourceWindow as BackOfficeMainWindow).Accordion.Nodes["TopMenuDocuments"].Childs.ContainsKey("DocumentFinanceSeries")) ? ((pSourceWindow as BackOfficeMainWindow).Accordion.Nodes["TopMenuDocuments"].Childs["DocumentFinanceSeries"].Content as TreeViewDocumentFinanceSeries) : null; //Store Reference to BackOffice TreeViewDocumentFinanceYearSerieTerminal TreeViewDocumentFinanceYearSerieTerminal treeViewDocumentFinanceYearSerieTerminal = ((pSourceWindow as BackOfficeMainWindow).Accordion.Nodes["TopMenuDocuments"].Childs.ContainsKey("DocumentFinanceYearSerieTerminal")) ? ((pSourceWindow as BackOfficeMainWindow).Accordion.Nodes["TopMenuDocuments"].Childs["DocumentFinanceYearSerieTerminal"].Content as TreeViewDocumentFinanceYearSerieTerminal) : null; if (dataTableSelectedTerminals != null && dataTableSelectedTerminals.Rows.Count > 0) { //Request Acronym //string initialValue = string.Format("{0}{1}", pDocumentFinanceYear.Acronym, "01"); string initialValue = pDocumentFinanceYear.Acronym; logicpos.Utils.ResponseText resultAcronym = TreeViewDocumentFinanceSeries.PosConfirmAcronymSeriesDialog(pSourceWindow, pDocumentFinanceYear, dataTableSelectedTerminals, initialValue); // Protect to Skip Cancel if (resultAcronym.ResponseType == ResponseType.Ok) { int sqlCheckExistingSeriesResultInt = 0; string sqlCheckExistingSeries = "SELECT COUNT(*) AS Count FROM fin_documentfinanceseries WHERE (Disabled = 0 OR Disabled IS NULL);"; object sqlCheckExistingSeriesResult = GlobalFramework.SessionXpo.ExecuteScalar(sqlCheckExistingSeries); if (sqlCheckExistingSeriesResult != null) { sqlCheckExistingSeriesResultInt = Convert.ToInt16(sqlCheckExistingSeriesResult); } //Request User Confirmation if already has working Series ResponseType responseType = ResponseType.No; if (resultAcronym.ResponseType == ResponseType.Ok && sqlCheckExistingSeriesResultInt > 0) { responseType = Utils.ShowMessageTouch( GlobalApp.WindowStartup, DialogFlags.Modal, MessageType.Question, ButtonsType.YesNo, Resx.window_title_series_create_series, Resx.dialog_message_series_create_confirmation_text ); } else { //Auto Yes, if dont have series, assumes Yes responseType = ResponseType.Yes; } if (responseType == ResponseType.Yes) { //Get Result FrameworkCallsResult frameworkCallsResult = ProcessFinanceDocumentSeries.CreateDocumentFinanceYearSeriesTerminal(pDocumentFinanceYear, dataTableSelectedTerminals, resultAcronym.Text, false); //Prepare Result result = frameworkCallsResult.Result; //Refresh Child Trees DocumentFinanceYearSerieTerminal if (result) { //Refresh TreeViewDocumentFinanceSeries (If Visible/Enabled) if (treeViewDocumentFinanceSeries != null) { treeViewDocumentFinanceSeries.Refresh(); } //Refresh TreeViewDocumentFinanceYearSerieTerminal (If Visible/Enabled) if (treeViewDocumentFinanceYearSerieTerminal != null) { treeViewDocumentFinanceYearSerieTerminal.Refresh(); } } //Show Error to User, Outside of Framework (Non UI) else { Utils.ShowMessageTouch( pSourceWindow, DialogFlags.Modal, MessageType.Error, ButtonsType.Ok, Resx.global_error, string.Format("{0}{1}{1}{2}", string.Format(Resx.dialog_message_series_create_error, resultAcronym.Text), Environment.NewLine, frameworkCallsResult.Exception.InnerException.Message ) ); } } } } } catch (Exception ex) { _log.Error(ex.Message, ex); } return(result); }