private void FrmDetail_Load(object sender, EventArgs e)
        {
            //加载数据开始
            LoadController.State = "正在加载...";
            Thread.Sleep(500);
            //处理配置文件
            this.lblModality.Text = ModalityConfig.getXmlCate() + ":";
            //标记跳转到主窗口
            this.Tag = WinTag.frmSignQuery;
            var uInfo = uInfoRepository.UserInfoes.FirstOrDefault(p => p.ID == currentID);

            if (uInfo == null)
            {
                MessageBox.Show("跳转失败了");
                DialogHelper.ShowNextDlg(new Thread(delegate() { NinjectControllerFactory.Resolve <FrmSignQuery>().ShowDialog(); }));
                return;
            }
            //赋值操作
            this.lblShowModality.Text    = uInfo.modality;
            this.lblShowName.Text        = uInfo.uName;
            this.lblShowAge.Text         = uInfo.age.ToString();
            this.lblShowPhoneNum.Text    = uInfo.phoneNum.ToString();
            this.lblShowPersonIDNum.Text = uInfo.personIDNum;
            this.lblShowComment.Text     = uInfo.comment;
            this.lblShowGender.Text      = uInfo.gender;
            this.lblID.Text = uInfo.ID.ToString();
            //图片显示处理
            this.picShowMyPhoto.SizeMode = PictureBoxSizeMode.StretchImage;
            this.picShowMyPhoto.Image    = ImageHelper.BytesToImage(uInfo.photo);
            //加载完成
            LoadController.State = "加载完成...";
            Thread.Sleep(500);
            //关闭加载界面
            LoadController.Close();
        }
        //自定义的方法,封装查询处理
        private void currentPagePro(out int pageTotal)
        {
            bool isFirstModalityItem = this.cboModality.SelectedItem.ToString() == "全部" ? true : false;

            if (isFirstModalityItem)
            {
                LoadController.State = "正在检索...";
                UserInfoesListViewModel modelAll = new UserInfoesListViewModel
                {
                    //类初始化器
                    UserInfoes = uInfoRepository.UserInfoes
                                 .OrderBy(p => p.ID)
                                 .Skip((page - 1) * PageSize)
                                 .Take(PageSize),

                    PagingInfo = new PagingInfo
                    {
                        CurrentPage  = page,
                        ItemsPerPage = PageSize,
                        TotalItems   = uInfoRepository.UserInfoes.Count()
                    }
                };
                pageTotal = modelAll.PagingInfo.TotalPages;
                this.dgvPeople.DataSource = modelAll.UserInfoes.ToList();
                //加载完成
                LoadController.State = "检索完成...";
                Thread.Sleep(500);
                //关闭加载界面
                LoadController.Close();
                return;
            }

            LoadController.State = "正在检索...";
            UserInfoesListViewModel modelPart = new UserInfoesListViewModel
            {
                //类初始化器
                UserInfoes = uInfoRepository.UserInfoes
                             .Where(p => p.modality == Modality)
                             .OrderBy(p => p.ID)
                             .Skip((page - 1) * PageSize)
                             .Take(PageSize),

                PagingInfo = new PagingInfo
                {
                    CurrentPage  = page,
                    ItemsPerPage = PageSize,
                    TotalItems   = uInfoRepository.UserInfoes.Where(p => p.modality == Modality).Count()
                }
            };

            pageTotal = modelPart.PagingInfo.TotalPages;
            this.dgvPeople.DataSource = modelPart.UserInfoes.ToList();
            //加载完成
            LoadController.State = "检索完成...";
            Thread.Sleep(500);
            //关闭加载界面
            LoadController.Close();
        }
        //系统提供的事件——窗体加载处理
        private void FrmManage_Load(object sender, EventArgs e)
        {
            LoadController.State = "正在加载...";
            //配置文件处理
            this.lblModality.Text = ModalityConfig.getXmlCate() + ":";
            this.dgvPeople.Columns[2].HeaderText = ModalityConfig.getXmlCate();
            this.btnModality.Text = ModalityConfig.getXmlCateCount();

            //处理窗口之间如何跳转
            this.Tag = WinTag.frmLogin;

            //处理下拉选择框
            this.cboModality.Items.Add("全部");
            UserInfoesListViewModel model = new UserInfoesListViewModel
            {
                //类初始化器
                UserInfoes = uInfoRepository.UserInfoes,
                PagingInfo = new PagingInfo()
                {
                    ItemsPerPage = PageSize,
                    TotalItems   = uInfoRepository.UserInfoes.Count()
                }
            };

            //默认加载全部的数据
            this.cboCurrentPage.Items.Add("1");
            this.cboModality.SelectedIndex = 0;
            foreach (var p in model.UserInfoes)
            {
                this.cboGenderContext.Items.Add(p.gender);
            }
            RemoveRepeatItem(this.cboGenderContext);
            foreach (DataRowView dr in ModalityConfig.getXmlSubjectData().Tables[0].DefaultView)
            {
                var tempStr = dr["name"].ToString();
                this.cboModality.Items.Add(tempStr);
                this.cboModalityContext.Items.Add(tempStr);
            }
            //数据视图附加下拉选择框
            this.dgvPeople.Controls.Add(this.cboModalityContext);
            this.dgvPeople.Controls.Add(this.cboGenderContext);
            //加载完成
            LoadController.State = "加载完成...";
            Thread.Sleep(500);
            //关闭加载界面
            loadingFrm = LoadController.Close();
        }
        private void FrmModality_Load(object sender, EventArgs e)
        {
            //加载数据开始
            LoadController.State = "正在加载...";
            Thread.Sleep(500);
            //处理配置文件
            this.Text          = ModalityConfig.getXmlCateCount();
            this.lblTitle.Text = ModalityConfig.getXmlCateCount();

            //显示图例
            Font myFont = new Font("黑体", 20);

            this.chartSubject.Series.Clear();

            List <int>    value = new List <int>();
            List <String> str   = new List <String>();

            foreach (DataRowView dr in ModalityConfig.getXmlSubjectData().Tables[0].DefaultView)
            {
                var tempStr   = dr["name"].ToString();
                var tempValue = uInfoRepository.UserInfoes.Where(p => p.modality == tempStr).ToList().Count;
                value.Add(tempValue);
                str.Add(tempStr);
            }
            Series mySeries = new Series(ModalityConfig.getXmlCateCount());

            mySeries.Points.DataBindXY(str, value);
            mySeries.IsValueShownAsLabel = true;
            mySeries.LabelForeColor      = Color.Red;
            mySeries.Font = myFont;
            this.chartSubject.Series.Add(mySeries);
            this.chartSubject.DataBind();
            //加载完成
            LoadController.State = "加载完成...";
            Thread.Sleep(500);
            //关闭加载界面
            LoadController.Close();
        }
        //系统提供的事件——姓名、手机号模糊查询
        private void btnQuery_Click(object sender, EventArgs e)
        {
            if (QueryName == "" && QueryPhoneNum == "")
            {
                return;
            }
            //加载数据开始
            loadingFrm.Show();
            LoadController.State = "正在检索...";
            Thread.Sleep(500);
            UserInfoesListViewModel model = new UserInfoesListViewModel
            {
                UserInfoes = uInfoRepository.UserInfoes
                             .Where(p => p.uName.Contains(QueryName) && p.phoneNum.Contains(QueryPhoneNum))
            };

            this.dgvPeople.DataSource = model.UserInfoes.ToList();
            this.panelBottom.Hide();
            //加载完成
            LoadController.State = "检索完成...";
            Thread.Sleep(500);
            //关闭加载界面
            LoadController.Close();
        }