public void LoadData(string strwhere)
        {
           Bestway.Windows.Forms.ProgressBarDialog procDlg = null;
            procDlg = new Bestway.Windows.Forms.ProgressBarDialog();
            try
            {
                procDlg.Show(Bestway.Windows.Forms.EnumDisplayType.LoadData, "      正在加载数据,请稍等...");
                //cbHeader._checked = false;
                dgvList.Rows.Clear();

                List<DB_Talk.Model.v_Member> lst = new List<DB_Talk.Model.v_Member>();
                lst = new DB_Talk.BLL.v_Member().GetModelList("i_Flag=0 and BoxID='" + Global.Params.BoxID + "' and i_IsDispatch=0 " + strwhere);

                int i = 0;
                foreach (DB_Talk.Model.v_Member item in lst)
                {
                    i++;
                    string numberType = "", level, telType = "",strAuthority="";
                    if (item.NumberTypeID != null)
                        numberType = ((CommControl.PublicEnums.EnumNumberType)item.NumberTypeID).ToString().Replace("_", "-");
                    if (item.i_TellType != null)
                        telType = ((CommControl.PublicEnums.EnumTelType)item.i_TellType).ToString().Replace("G3","G"); ;
                    if (item.LevelID == null) 
                        level = "";
                    else 
                        level = ((PublicEnums.EnumLevel)item.LevelID).ToString();

                    string paswType = "";
                    if (item.NumberTypeID != CommControl.PublicEnums.EnumNumberType.手机3G.GetHashCode())
                        paswType = item.i_NuPasswordType == 1 ? "固定" : "增加";
                    dgvList.Rows[dgvList.Rows.Add(item.ID," " + i,
                        item.vc_Name,
                        item.i_Number,
                        item.deptName,
                        paswType,
                        item.i_NuPassword == 0 ? "" : item.i_NuPassword.ToString(),
                        item.TellAuthority,
                        item.TellType,    //telType,          //item.TellType,
                        level,            //item.LevelName,
                        item.vc_UmtsImsi,
                        item.i_UnCForwardNu,
                        item.i_NoAnswerForward,
                        item.i_BusyForward,
                        item.i_PowerOffForward,
                        item.i_AssociateNum1,
                        item.i_AssociateNum2,
                        item.vc_Memo,
                        item.vc_IP

                        )].Tag = item;
                }
                kryptonHeaderGroup1.ValuesSecondary.Heading = "  共" + dgvList.Rows.Count.ToString() + "个人员";
                //Tools.AcrReportManage.Current.RefushDataset();
                //loadReport(strwhere);
                loadReport();
                InitListBoxName();
                InitListBoxTel();
            }
            catch(Exception ex)
            {
                CommControl.Tools.WriteLog.AppendErrorLog(ex);
            }
            finally
            {
                procDlg.Dispose();
            }

           
        }
        private void ShowModel()
        {
            txtDispatchCenter.Text = PreBoxModel.i_DispatchNumber.ToString() == "0" ? "" : PreBoxModel.i_DispatchNumber.ToString();
            TxtEmergencyNumber.Text = PreBoxModel.i_EmergencyNumber.ToString() == "0" ? "" : PreBoxModel.i_EmergencyNumber.ToString();
            if (PreBoxModel.vc_NumberHead == null) 
                chkNumHead.EditValue = "";
            else
                chkNumHead.EditValue = PreBoxModel.vc_NumberHead.ToString() == "0" ? "" : PreBoxModel.vc_NumberHead.ToString();
            txtNumberLen.Text = PreBoxModel.i_NumberLen.ToString() == "0" ? "" : PreBoxModel.i_NumberLen.ToString();

            List<DB_Talk.Model.v_Member> lst = new List<DB_Talk.Model.v_Member>();
            lst = new DB_Talk.BLL.v_Member().GetModelList("i_Flag=0 and BoxID='" + Global.Params.BoxID + "' and i_IsDispatch=0 ");
            if (lst.Count > 0) //添加了用户号码之后不允许修改引导码和长度限制
            {
                 txtNumberLen.ReadOnly=true;

                 //chkNumHead.Properties.AllowDropDownWhenReadOnly = DevExpress.Utils.DefaultBoolean.False;
                 chkNumHead.Properties.ReadOnly=true;
            }
        }