private void cmdAdd_CommandClick(object sender, Janus.Windows.UI.CommandBars.CommandEventArgs e)
        {
            //cmdNew cmdEdit cmdDelete cmdExit cmdHelp
            if (e.Command.Key == "cmdNew")
            {
                this.ThemDoiTac();
            }
            else if (e.Command.Key == "cmdEdit")
            {
                this.SuaDoiTac();
            }
            else if (e.Command.Key == "cmdDelete")
            {
                DeleteDoiTac();
            }
            else if (e.Command.Key == "cmdActive")
            {
                this.ActiveDoiTac(true);
            }
            else if (e.Command.Key == "cmdUnActive")
            {
                this.ActiveDoiTac(false);
            }
            else if (e.Command.Key == "cmdExit")
            {
                this.Close();
                this.Dispose();
            }
            else if (e.Command.Key == "cmdHelp")
            {
                frmDoiTacTimKiem frm = new frmDoiTacTimKiem();
                if (frm.ShowDialog(this) == DialogResult.OK)
                {
                    ListDoiTac = frm.GetResultListOfDoiTac();
                    if (ListDoiTac.Count > 0)
                    {
                        grdDoiTac.DataSource = null;
                        grdDoiTac.DataMember = "ListOfDoiTac";
                        grdDoiTac.SetDataBinding(ListDoiTac, "ListOfDoiTac");

                        gridExport.DataSource = null;
                        gridExport.DataMember = "ListOfDoiTacEx";
                        gridExport.SetDataBinding(ListDoiTac, "ListOfDoiTacEx");
                    }
                    else
                    {
                        new MessageBox.MessageBoxBA().Show("Không tìm thấy kết quả nào");
                        return;
                    }
                }
            }
            else if (e.Command.Key == "cmdCapNhatMoiGioi")
            {
                frmCapNhatThongTinMoiGioi frm = new frmCapNhatThongTinMoiGioi();
                frm.ShowDialog();
                // // Create a background thread
                //bw  = new BackgroundWorker();
                // bw.DoWork += new DoWorkEventHandler(bw_DoWorkNew);
                // bw.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompleted);

                // // Create a progress form on the UI thread
                // m_fmProgress = null;
                // m_fmProgress = new fmProgress();

                // // Kick off the Async thread
                // bw.RunWorkerAsync();

                // // Lock up the UI with this modal progress form.
                // try
                // {

                //     m_fmProgress.ShowDialog(this);
                //     m_fmProgress = null;

                // }
                // catch (Exception ex)
                // {

                // }
            }
            else if (e.Command.Key == "cmdKiemTraTrung")
            {
                frmKiemTraTrungSoDoiTac frm = new frmKiemTraTrungSoDoiTac();
                frm.Show();
            }
            else if (e.Command.Key == "cmdExcel")
            {
                this.XuatExcel();
            }
        }
        private void barButton_CapNhatCuocGoi_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmCapNhatThongTinMoiGioi frm = new frmCapNhatThongTinMoiGioi();

            frm.ShowDialog();
        }
Exemple #3
0
        private void mnuCapNhatCG_Click(object sender, EventArgs e)
        {
            frmCapNhatThongTinMoiGioi frm = new frmCapNhatThongTinMoiGioi(G_ListDoiTac);

            frm.ShowDialog();
        }