示例#1
0
        private void NewStaff_Click(object sender, EventArgs e)
        {
            StaffAdd lsFrm = new StaffAdd();

            lsFrm.Connnection = lsGdb.Gdb;
            lsFrm.FlagStafF   = (StaffAdd.FlagStaff)flagStaff;
            lsFrm.FlagNew     = true;
            lsFrm.ShowDialog(this);
            SelectStaff();
        }
示例#2
0
        private void GrdView_CellDoubleClick(object sender, FarPoint.Win.Spread.CellClickEventArgs e)
        {
            if (lsGdb.Gdb.State == ConnectionState.Closed)
            {
                lsGdb.ConnectDatabase();
            }
            else
            {
                lsGdb.Gdb.Close();
                lsGdb.Gdb.Open();
                //lsGdb.ConnectDatabase();
            }
            StaffAdd frmStaffAdd = new StaffAdd();

            frmStaffAdd.Connnection = lsGdb.Gdb;
            frmStaffAdd.FlagStafF   = (StaffAdd.FlagStaff)flagStaff;
            frmStaffAdd.lsStaffID   = GrdView.ActiveSheet.GetText(e.Row, 0);
            frmStaffAdd.Connnection = lsGdb.Gdb;
            frmStaffAdd.ShowDialog(this);
            SelectStaff();
        }