private void bbiAddNew_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            FrmTutor form = new FrmTutor();

            if (form.ShowDialog() == DialogResult.OK)
            {
                ITutorMgr tutorMgr = new ContainerBootstrapper().ChildContainer.Resolve <ITutorMgr>();
                Tutor     tutor    = form.Tutor;
                tutorMgr.Create(tutor.Name, tutor.Gender, tutor.PhoneNumber, tutor.Address, tutor.IsManager);
                XtraMessageBox.Show("成功地新建了教师用户!\n\n默认密码为\"password\"");
                LoadTutors();
            }
        }
        private void bbiModify_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            Tutor tutor = gridViewTutors.GetFocusedRow() as Tutor;

            if (tutor == null)
            {
                XtraMessageBox.Show("请先选择待修改的教师!", "提示");
                return;
            }

            FrmTutor form = new FrmTutor(tutor);

            if (form.ShowDialog() == DialogResult.OK)
            {
                ITutorMgr tutorMgr = new ContainerBootstrapper().ChildContainer.Resolve <ITutorMgr>();
                tutor = form.Tutor;
                tutorMgr.Modify(tutor);
                XtraMessageBox.Show("成功地修改了教师用户!");
            }
        }