Пример #1
0
        /// <summary>
        /// 获取科长系长组长 确认下拉
        /// </summary>
        public void GetGridInitComBobox()
        {
            string str1 = string.Format(@"SELECT ID,pName FROM Attend_Confirm");
            m_tblAttendConfirm = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str1);
            for (int i = 0; i < m_tblAttendConfirm.Rows.Count; i++)
            {
                CboItemEntity item4 = new CboItemEntity();
                item4.Value = m_tblAttendConfirm.Rows[i]["ID"].ToString();
                item4.Text = m_tblAttendConfirm.Rows[i]["pName"].ToString();
                repositoryItemComboBox4.Items.Add(item4);

                CboItemEntity item5 = new CboItemEntity();
                item5.Value = m_tblAttendConfirm.Rows[i]["ID"].ToString();
                item5.Text = m_tblAttendConfirm.Rows[i]["pName"].ToString();
                repositoryItemComboBox5.Items.Add(item5);

                CboItemEntity item6 = new CboItemEntity();
                item6.Value = m_tblAttendConfirm.Rows[i]["ID"].ToString();
                item6.Text = m_tblAttendConfirm.Rows[i]["pName"].ToString();
                repositoryItemComboBox6.Items.Add(item6);
            }
        }
Пример #2
0
        /// <summary>
        /// 表格改变事件
        /// </summary>
        private void gridView2_CellValueChanged(object sender, DevExpress.XtraGrid.Views.Base.CellValueChangedEventArgs e)
        {
            return;
            gridView2.CloseEditor();
            gridView2.UpdateCurrentRow();
            if (gridView2.FocusedRowHandle < 0) return;
            DataView view ;
            DataTable dt_temp = new DataTable();
            string str_where = string.Empty;

            switch (e.Column.FieldName)
            {
                case "JobForID":
                    str_where = " where 1=1 ";
                    string strJobFor = gridView2.GetFocusedRowCellValue(e.Column.FieldName).ToString();
                     view = new DataView(m_tblJobForID.Copy());
                    view.RowFilter = "JobForName='" + strJobFor + "'";
                     dt_temp=view.ToTable();
                    if (dt_temp.Rows.Count == 1)
                    {
                        str_where += " and JobForID='" + dt_temp.Rows[0]["JobForID"].ToString() + "'";
                    }

                    //工程别
                    string str_sql = string.Format(@"select DISTINCT ProjectID,ProjectName FROM v_Produce_Para_i " + str_where + " order by ProjectName");
                    m_tblProjectID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                    for (int i = 0; i < m_tblProjectID.Rows.Count; i++)
                    {
                        CboItemEntity item = new CboItemEntity();
                        item.Value = m_tblProjectID.Rows[i]["ProjectID"].ToString();
                        item.Text = m_tblProjectID.Rows[i]["ProjectName"].ToString();
                        repositoryItemComboBox5.Items.Add(item);
                    }
                    break;
                case "ProjectID":
                    string strProject = gridView2.GetFocusedRowCellValue(e.Column.FieldName).ToString();
                    view = new DataView(m_tblProjectID.Copy());
                     view.RowFilter = "ProjectName='" + strProject + "'";
                     dt_temp=view.ToTable();
                    if (dt_temp.Rows.Count == 1)
                    {
                        str_where = " where ProjectID='" + dt_temp.Rows[0]["ProjectID"].ToString() + "'";
                    }
                    str_sql = string.Format(@"select DISTINCT LineID,LineName FROM v_Produce_Para_i " + str_where + " order by LineName");
                    m_tblLineID= SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);

                    //Line别
                    for (int i = 0; i < m_tblLineID.Rows.Count; i++)
                    {
                        CboItemEntity item = new CboItemEntity();
                        item.Value = m_tblLineID.Rows[i]["LineID"].ToString();
                        item.Text = m_tblLineID.Rows[i]["LineName"].ToString();
                        repositoryItemComboBox6.Items.Add(item);
                    }
                    break;
                case"":
                    break;

            }
        }
Пример #3
0
        /// <summary>
        /// 获取表格信息一览
        /// </summary>
        protected override void GetDspDataList()
        {
            //获取向别下拉
            string str_sql = string.Format(@"Select id as JobForID,pName as JoBForName From P_Produce_JobFor Order by id");
            m_tblJobForID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
            for (int i = 0; i < m_tblJobForID.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_tblJobForID.Rows[i]["JobForID"].ToString();
                item.Text = m_tblJobForID.Rows[i]["JoBForName"].ToString();
                repositoryItemComboBox4.Items.Add(item);
            }
            if (Common._myTeamName != "")
            {
                repositoryItemComboBox4.NullText = Common._myTeamName;
            }

            //工程别
            str_sql = string.Format(@"select DISTINCT ProjectID,ProjectName FROM v_Produce_Para_i  order by ProjectName");
            m_tblProjectID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
            for (int i = 0; i < m_tblProjectID.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_tblProjectID.Rows[i]["ProjectID"].ToString();
                item.Text = m_tblProjectID.Rows[i]["ProjectName"].ToString();
                repositoryItemComboBox5.Items.Add(item);
            }

            str_sql = string.Format(@"select DISTINCT LineID,LineName FROM v_Produce_Para_i  order by LineName");
            m_tblLineID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);

            //Line别
            for (int i = 0; i < m_tblLineID.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_tblLineID.Rows[i]["LineID"].ToString();
                item.Text = m_tblLineID.Rows[i]["LineName"].ToString();
                repositoryItemComboBox6.Items.Add(item);
            }

            str_sql = string.Format(@"select Distinct T.GuanweiName from (
                                                    (select p.*,g.pName as GuanweiName from Produce_Guanwei p inner 
                                                        join P_Produce_Guanwei g on p.GuanweiID=g.ID) )T Order by GuanweiName");
            m_tblGuanwei = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);

            //关位
            for (int i = 0; i < m_tblGuanwei.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = i;
                item.Text = m_tblGuanwei.Rows[i]["GuanweiName"].ToString();
                repositoryItemComboBox7.Items.Add(item);
            }

            str_sql = string.Format(@"select * from P_License_S");
            DataTable dt_temp = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);

            //等级
            for (int i = 0; i < dt_temp.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = dt_temp.Rows[i]["ID"].ToString();
                item.Text = dt_temp.Rows[i]["pName"].ToString();
                repositoryItemComboBox8.Items.Add(item);
            }
        }
Пример #4
0
        /// <summary>
        /// 获取表格信息一览下拉框初始数据
        /// </summary>
        protected override void GetDspDataList()
        {
            try
            {
                //获取向别下拉
                string str_sql = string.Format(@"Select id as JobForID,pName as JoBForName From P_Produce_JobFor Order by id");
                m_tblJobForID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                repositoryItemComboBox1.Items.Clear();
                CboItemEntity item;
                for (int i = 0; i < m_tblJobForID.Rows.Count; i++)
                {
                    item = new CboItemEntity();
                    item.Value = m_tblJobForID.Rows[i]["JobForID"].ToString();
                    item.Text = m_tblJobForID.Rows[i]["JobForName"].ToString();
                    repositoryItemComboBox1.Items.Add(item);
                }


                //工程别
                str_sql = string.Format(@"select DISTINCT ProjectID,ProjectName FROM v_Produce_Para  order by ProjectName");
                m_tblProjectID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblProjectID.Rows.Count; i++)
                {
                    item = new CboItemEntity();
                    item.Value = m_tblProjectID.Rows[i]["ProjectID"].ToString();
                    item.Text = m_tblProjectID.Rows[i]["ProjectName"].ToString();
                    repositoryItemComboBox2.Items.Add(item);
                }

                //Line别
                str_sql = string.Format(@"select DISTINCT LineID,LineName FROM V_Produce_Para  order by LineName");
                m_tblLineID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblLineID.Rows.Count; i++)
                {
                    item = new CboItemEntity();
                    item.Value = m_tblLineID.Rows[i]["LineID"].ToString();
                    item.Text = m_tblLineID.Rows[i]["LineName"].ToString();
                    repositoryItemComboBox3.Items.Add(item);
                }

                //关位
                str_sql = string.Format(@"select DISTINCT GuanweiID,GuanweiName FROM V_Produce_Para  order by GuanweiName");
                m_tblGuanweiID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblGuanweiID.Rows.Count; i++)
                {
                    item = new CboItemEntity();
                    item.Value = m_tblGuanweiID.Rows[i]["GuanweiID"].ToString();
                    item.Text = m_tblGuanweiID.Rows[i]["GuanweiName"].ToString();
                    repositoryItemComboBox4.Items.Add(item);
                }

                //等级
                str_sql = string.Format(@"select * from P_License_S");
                m_tblSID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblSID.Rows.Count; i++)
                {
                    item = new CboItemEntity();
                    item.Value = m_tblSID.Rows[i]["ID"].ToString();
                    item.Text = m_tblSID.Rows[i]["pName"].ToString();
                    repositoryItemComboBox5.Items.Add(item);
                }
                txtGuanwei.Focus();
            }
            catch (Exception ex)
            {
                log.Error(ex);
                XtraMsgBox.Show("下拉框初始化失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
Пример #5
0
        public void GetGridInitComBobox()
        {
            //类型
            string str1 = string.Format(@"select * from P_Produce_TeamKind ");
            m_Type = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str1);
            for (int i = 0; i < m_Type.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_Type.Rows[i]["ID"].ToString();
                item.Text = m_Type.Rows[i]["pName"].ToString();
                repositoryItemComboBox2.Items.Add(item);
            }

            
        }
Пример #6
0
        /// <summary>
        /// 获取下拉框数据
        /// </summary>
        public void GetComboBox()
        {
            DataTable dt_temp = new DataTable();
            CboItemEntity item = new CboItemEntity();
            //获取向别下拉
            string str_sql = string.Format(@"Select distinct myteamName from V_Produce_Para order by myteamName");
            m_tblJobForID = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
            for (int i = 0; i < m_tblJobForID.Rows.Count; i++)
            {
                item = new CboItemEntity();
                item.Value = m_tblJobForID.Rows[i]["myteamName"].ToString();
                item.Text = m_tblJobForID.Rows[i]["myteamName"].ToString();
                repositoryItemComboBox2.Items.Add(item);
            }
            
            

            //考勤单位
            item = new CboItemEntity();
            item.Value = "是";
            item.Text = "是";
            repositoryItemComboBox7.Items.Add(item);
            item = new CboItemEntity();
            item.Value = "否";
            item.Text = "否";
            repositoryItemComboBox7.Items.Add(item);
           
        }
Пример #7
0
        private void gridView1_FocusedRowChanged(object sender, DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs e)
        {
            if (gridView1.FocusedRowHandle < 0) { return; }
                string strmyteamName = m_tblDataList.Rows[gridView1.FocusedRowHandle]["myTeamName"].ToString();

                string str_sql = string.Format(@"Select GuanweiID, GuanweiName,SetNum From V_Produce_Para where myTeamName='{0}' Order by GuanweiID", strmyteamName);
                m_tblGuanwei = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                repositoryItemComboBox3.Items.Clear();
                //关位
                for (int i = 0; i < m_tblGuanwei.Rows.Count; i++)
                {
                    CboItemEntity item = new CboItemEntity();
                    //item.Value = i;
                    item.Value = m_tblGuanwei.Rows[i]["GuanweiID"].ToString();
                    item.Text = m_tblGuanwei.Rows[i]["GuanweiName"].ToString();
                    repositoryItemComboBox3.Items.Add(item);

                }


                //位置
                string GuanweiName = m_tblDataList.Rows[gridView1.FocusedRowHandle]["GuanweiName"].ToString();
                DataView view = new DataView(m_tblGuanwei.Copy());
                view.RowFilter = "GuanweiName='" + GuanweiName + "'";
                DataTable dt = view.ToTable();
                if (dt.Rows.Count > 0)
                {
                    //位置
                    int guanweiSite = int.Parse(dt.Rows[0]["SetNum"].ToString());
                    CboItemEntity item = new CboItemEntity();
                    repositoryItemComboBox6.Items.Clear();
                    for (int i = 0; i < guanweiSite; i++)
                    {
                        item = new CboItemEntity();
                        item.Value = i + 1;
                        item.Text = i + 1;
                        repositoryItemComboBox6.Items.Add(item);

                    }
                    item = new CboItemEntity();
                    item.Value = "99";
                    item.Text = "99";
                    repositoryItemComboBox6.Items.Add(item);
                    gridView1.BestFitColumns();
                }
            }
Пример #8
0
        /// <summary>
        /// 选择关位信息
        /// </summary>
         void repositoryItemComboBox3_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                gridView1.CloseEditor();
                gridView1.UpdateCurrentRow();
                m_tblDataList = ((DataView)this.gridView1.DataSource).ToTable();
                DataRow row = gridView1.GetFocusedDataRow();
                DataView view = new DataView(m_tblGuanwei.Copy());
                
                view.RowFilter = "GuanweiName='" + row["GuanweiName"].ToString() + "'";
                DataTable dt = view.ToTable();
                if (dt.Rows.Count > 0)
                {
                    m_tblDataList.Rows[gridView1.FocusedRowHandle]["GuanWeiID"] = dt.Rows[0]["GuanWeiID"].ToString();
                    //位置
                    int guanweiSite = int.Parse(dt.Rows[0]["SetNum"].ToString());
                    CboItemEntity item = new CboItemEntity();
                    repositoryItemComboBox6.Items.Clear();
                    for (int i = 0; i < guanweiSite; i++)
                    {
                        item = new CboItemEntity();
                        item.Value = i + 1;
                        item.Text = i + 1;
                        repositoryItemComboBox6.Items.Add(item);

                    }
                    item = new CboItemEntity();
                    item.Value = "99";
                    item.Text = "99";
                    repositoryItemComboBox6.Items.Add(item);
                    gridView1.BestFitColumns();

                }

                if (gridView1.GetFocusedDataRow()["ID"].ToString() != ""){
                    if(gridView1.GetFocusedDataRow()["GuanWeiNameBak"].ToString() != gridView1.GetFocusedDataRow()["GuanWeiName"].ToString()
                        ||gridView1.GetFocusedDataRow()["GuanweiSiteBak"].ToString() != gridView1.GetFocusedDataRow()["GuanweiSite" ].ToString())
                     {
                        m_tblDataList.Rows[gridView1.FocusedRowHandle]["pmark"] = "调整关位";
                        gridControl1.DataSource = m_tblDataList;
                    }
                    else {
                        m_tblDataList.Rows[gridView1.FocusedRowHandle]["pmark"] = "";
                        gridControl1.DataSource = m_tblDataList;
                    }
                }
                   
                
            }
            catch (Exception ex)
            {
                XtraMsgBox.Show("加载关位失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
Пример #9
0
        /// <summary>
        /// 选择向别信息
        /// </summary>
        void repositoryItemComboBox2_EditValueChanged(object sender, EventArgs e)
        {
            try
            {
                string strID = gridView1.GetFocusedDataRow()["ID"].ToString();
                if (strID != "")
                {
                    XtraMsgBox.Show("向别-班别不能修改!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error);
                    gridView1.BestFitColumns();
                    return;
                }
                gridView1.CloseEditor();
                gridView1.UpdateCurrentRow();
                m_tblDataList = ((DataView)this.gridView1.DataSource).ToTable();
                DataRow row = gridView1.GetFocusedDataRow();
                if (row["ID"].ToString()!="") {
                    return;
                }
                string strmyteamName = row["myTeamName"].ToString();
                m_tblDataList.Rows[gridView1.FocusedRowHandle]["myTeamName"] = strmyteamName;
                string str_sql = string.Format(@"Select GuanweiID, GuanweiName,SetNum From V_Produce_Para where myTeamName='{0}' Order by GuanweiID", strmyteamName);
                m_tblGuanwei = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                repositoryItemComboBox3.Items.Clear();
                //关位
                for (int i = 0; i < m_tblGuanwei.Rows.Count; i++)
                {
                    CboItemEntity item = new CboItemEntity();
                    //item.Value = i;
                    item.Value = m_tblGuanwei.Rows[i]["GuanweiID"].ToString();
                    item.Text = m_tblGuanwei.Rows[i]["GuanweiName"].ToString();
                    repositoryItemComboBox3.Items.Add(item);

                }

                gridView1.BestFitColumns();
            }
            catch (Exception ex)
            {
                XtraMsgBox.Show("加载关位失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }
Пример #10
0
        }  //防止闪烁
        /// <summary>
        /// 窗体初始化处理
        /// </summary>
        public override void SetFormValue()
        {
            try
            {
                repositoryItemDateEdit2.EditMask = "yyyy-MM-dd HH:mm";
                repositoryItemDateEdit2.Mask.UseMaskAsDisplayFormat = true;

                repositoryItemDateEdit3.EditMask = "yyyy-MM-dd HH:mm";
                repositoryItemDateEdit3.Mask.UseMaskAsDisplayFormat = true;

                gridView1.IndicatorWidth =70;


                //班别
                SysParam.m_daoCommon.SetLoopUpEdit(TableNames.P_Produce_Scheduling, lookTeamType, true, EnumDefine.DefalutItemAllNo, EnumDefine.DefalutItemAllText);
                repositoryItemComboBox2.ParseEditValue += new DevExpress.XtraEditors.Controls.ConvertEditValueEventHandler(repositoryItemComboBox2_ParseEditValue);
                repositoryItemButtonEdit1.ButtonClick+=new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(repositoryItemButtonEdit1_ButtonClick);
                if (gridView1 != null)
                {
                    gridView1.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView1_CustomDrawRowIndicator);
                }
               

                //获取白班晚班
                string str_sql = string.Format(@"select ID as pTypeID,pName as TeamSetName from P_Produce_TeamKind ");
                m_tblTeamType = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblTeamType.Rows.Count; i++)
                {
                    CboItemEntity item = new CboItemEntity();
                    item.Value = m_tblTeamType.Rows[i]["pTypeID"].ToString();
                    item.Text = m_tblTeamType.Rows[i]["TeamSetName"].ToString();
                    repositoryItemComboBox2.Items.Add(item);
                }
                if (Common._myTeamName != "")
                {
                    repositoryItemComboBox2.NullText = Common._myTeamName;
                }
                GetDspDataList();
            }
            catch (Exception ex)
            {

                 FrmAttendDialog FrmDialog = new FrmAttendDialog( "画面初始化失败!"+ex);
                 FrmDialog.ShowDialog();
            }
        }
Пример #11
0
        /// <summary>
        /// 获取下拉
        /// </summary>
        public void GetComBobox() 
        {
            //获取账号状态下拉
            string str = string.Format(@"select * from P_Oper_Status");
            m_tblCbxList = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str);
            for (int i = 0; i < m_tblCbxList.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_tblCbxList.Rows[i]["ID"].ToString();
                item.Text = m_tblCbxList.Rows[i]["pName"].ToString();
                repositoryItemComboBox3.Items.Add(item);
            } 

            //获取用户类型下拉
            str = string.Format(@"select * from P_Oper_Type");
            m_tblCbxType = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str);
            for (int i = 0; i < m_tblCbxType.Rows.Count; i++)
            {
                CboItemEntity item = new CboItemEntity();
                item.Value = m_tblCbxType.Rows[i]["ID"].ToString();
                item.Text = m_tblCbxType.Rows[i]["pName"].ToString();
                repositoryItemComboBox4.Items.Add(item);
            } 
        }
Пример #12
0
        /// <summary>
        /// 获取下拉框数据
        /// </summary>
        public void GetSelectLookUpList()
        {
            try
            {
               

                string strSql = "";
                //************向别-班别************
                if (Common._myTeamName == "" || Common._myTeamName == null)
                {
                    strSql = string.Format(@"select distinct myteamName from V_Produce_Para WHERE myteamName<>''  order by myteamName");
                }
                else
                {
                    strSql = string.Format(@"Select distinct myteamName From V_Produce_Para  where  myTeamName in ('{0}') AND myteamName<>'' Order by myteamName", Common._myTeamName);
                }
                DataTable dt_temp = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(strSql);

                //默认选中
                DataRow dr = dt_temp.NewRow();

                dr[0] = "全部";
                dt_temp.Rows.InsertAt(dr, 0);
                lookUpEditmyTeamName.Properties.DataSource = dt_temp.DefaultView;
                lookUpEditmyTeamName.Properties.ValueMember = dt_temp.Columns[0].ColumnName;
                lookUpEditmyTeamName.Properties.DisplayMember = dt_temp.Columns[0].ColumnName; ;

                if (dt_temp.Rows.Count > 0)
                {
                    lookUpEditmyTeamName.EditValue = dt_temp.Rows[0][0].ToString();
                }
                lookUpEditmyTeamName.ItemIndex = 0;
                lookUpEditmyTeamName.Properties.BestFit();

                //************班种************
                //班别
                SysParam.m_daoCommon.SetLoopUpEdit(TableNames.P_Produce_Scheduling, lookUpEditScheduling, true, EnumDefine.DefalutItemAllNo, EnumDefine.DefalutItemAllText);
                repositoryItemComboBox2.ParseEditValue += new DevExpress.XtraEditors.Controls.ConvertEditValueEventHandler(repositoryItemComboBox2_ParseEditValue);
                if (gridView1 != null)
                {
                    gridView1.CustomDrawRowIndicator += new DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventHandler(gridView1_CustomDrawRowIndicator);
                }
                

                //获取白班晚班
                string str_sql = string.Format(@"select ID as TypeID,pName as TypeName from P_Produce_TeamKind ");
                m_tblTeamType = SysParam.m_daoCommon.GetTableInfoBySqlNoWhere(str_sql);
                for (int i = 0; i < m_tblTeamType.Rows.Count; i++)
                {
                    CboItemEntity item = new CboItemEntity();
                    item.Value = m_tblTeamType.Rows[i]["TypeID"].ToString();
                    item.Text = m_tblTeamType.Rows[i]["TypeName"].ToString();
                    repositoryItemComboBox2.Items.Add(item);
                }

                //开始时间
                repositoryItemDateEdit1.EditMask = "yyyy-MM-dd HH:mm";
                repositoryItemDateEdit1.Mask.UseMaskAsDisplayFormat = true;
                //结束时间
                repositoryItemDateEdit2.EditMask = "yyyy-MM-dd HH:mm";
                repositoryItemDateEdit2.Mask.UseMaskAsDisplayFormat = true;

            }
            catch (Exception ex)
            {
                log.Error(ex);
                XtraMsgBox.Show("数据加载失败!", this.Text, MessageBoxButtons.OK, MessageBoxIcon.Error, ex, this.GetType());
            }
        }