private void btn_FinalDrop_Click(object sender, RoutedEventArgs e) { try { //Drop _FillType = "FINALDROP"; if (cmbTransactionReason.SelectedIndex < 1) { lbl_Status.Text = Application.Current.FindResource("Vault_MessageID6") as string; cmbTransactionReason.Focus(); return; } if (_IsWebServiceEnabled) { int VaultID = int.Parse(cmb_DeviceName.SelectedValue.ToString()); CVaultFillCassette c_cassette = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 0, VaultTransactionType.FinalDrop, _FillType, (int)cmbTransactionReason.SelectedValue, txt_Manufacturer.Text, txt_Type.Text, cmbTransactionReason.Text, lst_denoms,false, NoVault); c_cassette.Owner = Window.GetWindow(this); c_cassette.ShowDialog(); cmbTransactionReason.SelectedIndex = 0; } else { _IsFinalDrop = true; showModel(DropVault); _IsFinalDrop = false; } } catch (Exception Ex) { ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } }
private void btn_StandardDrop_Click(object sender, RoutedEventArgs e) { try { //Drop _FillType = "DROP"; //showModel(DropVault); if (cmbTransactionReason.SelectedIndex < 1) { lbl_Status.Text = Application.Current.FindResource("Vault_MessageID6") as string; cmbTransactionReason.Focus(); return; } if (_IsWebServiceEnabled) { int VaultID = int.Parse(cmb_DeviceName.SelectedValue.ToString()); //call standard method Action act_Standard = new Action(() => { System.Windows.Forms.DialogResult dlgResultStandardDrop = MessageBox.ShowBox("Vault_MessageID18", BMC_Icon.Question, BMC_Button.YesNo, ""); if (dlgResultStandardDrop == System.Windows.Forms.DialogResult.Yes) { try { //Fill standard amount LogManager.WriteLog("CFillVault:Start standard Fill ", LogManager.enumLogLevel.Debug); _FillType = "STANDARDFILL"; CVaultFillCassette c_cassettestandard = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 0, VaultTransactionType.StandardFill, _FillType, InitialFillValue, txt_Manufacturer.Text, txt_Type.Text, strInitialFill, lst_denoms,true, RefreshVaultBalance); c_cassettestandard.Owner = Window.GetWindow(this); c_cassettestandard.ShowDialog(); RefreshVaultBalance(); } catch (Exception Ex) { ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } } else { RefreshVaultBalance(); } }); CVaultFillCassette c_cassette = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 0, VaultTransactionType.StandardDrop, _FillType, (int)cmbTransactionReason.SelectedValue, txt_Manufacturer.Text, txt_Type.Text, cmbTransactionReason.Text, lst_denoms,false, _IsStandardFillHasAccess ? act_Standard : RefreshVaultBalance); c_cassette.Owner = Window.GetWindow(this); c_cassette.ShowDialog(); cmbTransactionReason.SelectedIndex = 0; } else { showModel(DropVault); } } catch (Exception Ex) { ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } }
private void btn_StandardFill_Click(object sender, RoutedEventArgs e) { try { //Fill standard amount _sendAlert = false; LogManager.WriteLog("CFillVault:Start standard Fill ", LogManager.enumLogLevel.Debug); if (cmbTransactionReason.SelectedIndex < 1) { lbl_Status.Text = Application.Current.FindResource("Vault_MessageID6") as string; cmbTransactionReason.Focus(); return; } _FillType = "STANDARDFILL"; int VaultID = int.Parse(cmb_DeviceName.SelectedValue.ToString()); if (_IsWebServiceEnabled) { CVaultFillCassette c_cassette = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 0, VaultTransactionType.StandardFill, _FillType, (int)cmbTransactionReason.SelectedValue, txt_Manufacturer.Text, txt_Type.Text, cmbTransactionReason.Text, lst_denoms,false, RefreshVaultBalance); c_cassette.Owner = Window.GetWindow(this); c_cassette.ShowDialog(); cmbTransactionReason.SelectedIndex = 0; } else { _IsStandardFill = true; if (Vault.CreateInstance().IsStandardFillDoneTwice(VaultID)) { System.Windows.Forms.DialogResult dlgResult = MessageBox.ShowBox("Vault_MessageID20", BMC_Icon.Question, BMC_Button.YesNo, ""); if (dlgResult == System.Windows.Forms.DialogResult.No) { _IsStandardFill = false; return; } else { _sendAlert = true; } } showModel(FillVault); _IsStandardFill = false; } } catch (Exception Ex) { _IsStandardFill = false; ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } }
private void btn_Adjustment_Negative_Click(object sender, RoutedEventArgs e) { try { //Fill always negative amount _FillType = "ADJUSTMENT"; if (cmbTransactionReason.SelectedIndex < 1) { lbl_Status.Text = Application.Current.FindResource("Vault_MessageID6") as string; cmbTransactionReason.Focus(); return; } if (_IsWebServiceEnabled) { int VaultID = int.Parse(cmb_DeviceName.SelectedValue.ToString()); CVaultFillCassette c_cassette = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 1, VaultTransactionType.NegativeAdjustment, _FillType, (int)cmbTransactionReason.SelectedValue, txt_Manufacturer.Text, txt_Type.Text, cmbTransactionReason.Text, lst_denoms,false, RefreshVaultBalance); c_cassette.Owner = Window.GetWindow(this); c_cassette.ShowDialog(); cmbTransactionReason.SelectedIndex = 0; } else { showModel(BleedVault); } } catch (Exception Ex) { ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } }
private void btn_FillVault_Click(object sender, RoutedEventArgs e) { try { //Fill amount LogManager.WriteLog("CFillVault:Start Fill ", LogManager.enumLogLevel.Debug); if (cmbTransactionReason.SelectedIndex < 1) { lbl_Status.Text = Application.Current.FindResource("Vault_MessageID6") as string; cmbTransactionReason.Focus(); return; } _FillType = "FILL"; _sendAlert = false; if (_IsWebServiceEnabled) { int VaultID = int.Parse(cmb_DeviceName.SelectedValue.ToString()); CVaultFillCassette c_cassette = new CVaultFillCassette(VaultID, cmb_DeviceName.Text, 0, VaultTransactionType.Fill, _FillType, (int)cmbTransactionReason.SelectedValue, txt_Manufacturer.Text, txt_Type.Text, cmbTransactionReason.Text, lst_denoms,false, RefreshVaultBalance); c_cassette.Owner = Window.GetWindow(this); c_cassette.ShowDialog(); cmbTransactionReason.SelectedIndex = 0; } else { showModel(FillVault); } } catch (Exception Ex) { ExceptionManager.Publish(Ex); lbl_Status.Text = Application.Current.FindResource("Vault_MessageID2") as string; } }