コード例 #1
0
ファイル: frmMain.cs プロジェクト: Long18/Quanlythuexe
        public frmMain()
        {
            InitializeComponent();

            this.KeyPreview = true;
            this.KeyDown   += new KeyEventHandler(frmMain_KeyDown);

            nv      = new ucNhanVien();
            custom  = new ucCustomer();
            reg     = new ucRegister();
            login   = new ucLogin();
            vehicle = new ucVehicle();
            tt      = new ucThanhToan();
            bill    = new ucBill();
            denbu   = new ucPhieuDenBu();
            this.login.parentForm = this;
            this.reg.parentForm   = this;
            this.bill.parentForm  = this;
            this.denbu.parentForm = this;
            this.tt.parentForm    = this;



            this.panelForm.Controls.Clear();

            this.panel1.Controls.Add(this.labelYear);
            this.labelYear.Location = new System.Drawing.Point(12, 423);
            this.panel1.Controls.Add(this.labelTime);
            this.labelTime.Location = new System.Drawing.Point(13, 465);

            this.panel1.Controls.Clear();


            this.panel1.Controls.Add(this.btnHoaDon);
            this.btnHoaDon.Dock = DockStyle.Top;
            this.panel1.Controls.Add(this.btnLogin);
            this.btnLogin.Dock = DockStyle.Top;
            this.panel1.Controls.Add(this.btnVehicle);
            this.btnVehicle.Dock = DockStyle.Top;
            this.panel1.Controls.Add(this.btnThanhToan);
            this.btnThanhToan.Dock = DockStyle.Top;
            this.panel1.Controls.Add(this.btnNhanVien);
            this.btnNhanVien.Dock = DockStyle.Top;
            this.panel1.Controls.Add(this.btnCustomer);
            this.btnCustomer.Dock = DockStyle.Top;
            this.btnLogin.Dock    = DockStyle.Top;
            this.panel1.Controls.Add(this.btnLogin);



            this.panelForm.Controls.Add(new ucBackGround());
        }
コード例 #2
0
 private void windowsUIButtonPanel_ButtonClick(object sender, ButtonEventArgs e)
 {
     if (e.Button.Properties.Caption == "Delete")
     {
         if (XtraMessageBox.Show("Có chắc bạn muốn xoá không?", "Cảnh Báo", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
             == System.Windows.Forms.DialogResult.Yes)
         {
             gridView1.DeleteSelectedRows();
             onSave();
         }
     }
     if (e.Button.Properties.Caption == "Refresh")
     {
         onSave();
         gridControl1.DataSource = null;
         gridControl1.DataSource = qLTXDataSet.HOADON;
     }
     if (e.Button.Properties.Caption == "Phiếu Đền Bù")
     {
         ucPhieuDenBu denbu = new ucPhieuDenBu();
         controlUserControl.showControl(denbu, parentForm.panelForm);
     }
 }