예제 #1
0
        private void Tracuubutton_Click(object sender, EventArgs e)
        {
            TraCuu TC = new TraCuu();

            this.Visible = false;
            TC.ShowDialog();
            this.Visible = true;
        }
예제 #2
0
        // Function to call an Search BillID userControll (TraCuu)
        private void billToolStripMenuItem_Click(object sender, EventArgs e)
        {
            TraCuu open = new TraCuu("Tra cứu hóa đơn", api);

            this.Controls.Add(open);
            open.Left = (this.ClientSize.Width - open.Width) / 2;
            open.Top  = (this.ClientSize.Height - open.Height) / 2;
            open.BringToFront();
        }
예제 #3
0
        private void btnTraCuuNhanSu_Click(object sender, RoutedEventArgs e)
        {
            if (frmTraCuu == null)
            {
                frmTraCuu = new TraCuu();
            }

            // you need to take care of form closing because the object being disposed)
            frmTraCuu.Closed += delegate { frmTraCuu = null; };

            if (frmTraCuu.WindowState == WindowState.Minimized)
            {
                frmTraCuu.WindowState = WindowState.Normal;
            }

            frmTraCuu.Show();
            frmTraCuu.Activate();
        }
예제 #4
0
        private frmInputBarcode(XtraForm main, TraCuu traCuu, ThucHien thucHien, CapNhatGiaTriKhiBarCodeHopLe capNhat, BarcodeInputType type)
        {
            InitializeComponent();
            this._SoLg = "1";
            this._TraCuu = traCuu;
            this._ThucHien = thucHien;
            this._CapNhatGiaTriKhiBarCodeHopLe = capNhat;
            if(type == BarcodeInputType.TYPE1){
                this.barCode.KeyUp += new System.Windows.Forms.KeyEventHandler(this.barCode_KeyUp2);
                this.Slg.KeyUp += new System.Windows.Forms.KeyEventHandler(this.Slg_KeyUp2);
                this.FormClosing += new FormClosingEventHandler(this.frmInputBarcode__FormClosing);
                this.Slg.TextChanged += new EventHandler(Slg_TextChanged);
            }

            this.Top = main.Top;
            this.Left = main.Left + (main.Width - this.Width) / 2;

            PLKey key = new PLKey(this);
            key.Add(Keys.F5, delegate(){
                this.Close();
            });
        }