private void Grid_PreviewKeyDown_1(object sender, KeyEventArgs e)
        {
            switch (e.Key)
            {
            case Key.F2:
                cmdAdd_Click(sender, e);
                break;

            case Key.F6:
                fChitietPhieu();
                break;

            case Key.F7:
                if (pPhieuID == "")
                {
                    Utils.showMessage("Bạn chưa chọn phiếu để in...", "Lưu ý");
                }
                new MTReport().rptNX_Chanhxe(pPhieuID);
                break;

            case Key.F8:
                try
                {
                    MTMain oMain = Application.Current.Windows.OfType <MTMain>().FirstOrDefault();
                    if (oMain != null)
                    {
                        oMain.onExitTab();
                    }
                }
                catch { }
                break;
            }
        }
Exemplo n.º 2
0
 private void cmdExit_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         MTMain oMain = Application.Current.Windows.OfType <MTMain>().FirstOrDefault();
         if (oMain != null)
         {
             oMain.onExitTab();
         }
     }
     catch { }
 }
Exemplo n.º 3
0
 public static void fExit()
 {
     try
     {
         MTMain oMain = System.Windows.Application.Current.Windows.OfType <MTMain>().FirstOrDefault();
         if (oMain != null)
         {
             oMain.onExitTab();
         }
     }
     catch { }
 }