Exemple #1
0
        /// <summary>
        ///     修改时加载初始化设置
        /// </summary>
        //private void ChangeInfo()
        //{
        //    //绑定默认信息
        //    //绑定修改数据
        //    BindInfo();
        //}

        /// <summary>
        ///     datagridview绑定信息
        /// </summary>
        private void BindInfo()
        {
            //工作制式
            if (_dayReportJJEntity.WorkTimeStyle == Const_MS.WORK_TIME_38)
            {
                rbtn38.Checked = true;
            }
            if (_dayReportJJEntity.WorkTimeStyle == Const_MS.WORK_TIME_46)
            {
                rbtn46.Checked = true;
            }

            //队别
            cboTeamName.Text = Team.Find(_dayReportJJEntity.Team.TeamId).TeamName;

            //绑定队别成员
            DataBindUtil.LoadTeamMemberByTeamName(cboSubmitter, cboTeamName.Text);

            //填报人
            cboSubmitter.Text = _dayReportJJEntity.Submitter;
            dgrdvDayReportJJ.Rows.Add();
            dgrdvDayReportJJ[C_DATE, 0].Value          = Convert.ToString(_dayReportJJEntity.DateTime, CultureInfo.InvariantCulture);
            dgrdvDayReportJJ[C_WORK_TIME, 0].Value     = _dayReportJJEntity.WorkTime;
            dgrdvDayReportJJ[C_WORK_CONTENT, 0].Value  = _dayReportJJEntity.WorkInfo;
            dgrdvDayReportJJ[C_WORK_PROGRESS, 0].Value = _dayReportJJEntity.JinChi;
            dgrdvDayReportJJ[C_COMMENTS, 0].Value      = _dayReportJJEntity.Remarks;
        }
Exemple #2
0
 private void DayReportHcEntering_Load(object sender, EventArgs e)
 {
     DataBindUtil.LoadTeam(cboTeamName);
     DataBindUtil.LoadTeamMemberByTeamName(cboSubmitter, ((Team)cboTeamName.SelectedItem).TeamName);
     if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38)
     {
         rbtn38.Checked = true;
     }
     else
     {
         rbtn46.Checked = true;
     }
     SetWorkTimeName();
 }
Exemple #3
0
 private void DayReportJJEntering_Load(object sender, EventArgs e)
 {
     DataBindUtil.LoadTeam(cboTeamName);
     DataBindUtil.LoadTeamMemberByTeamName(cboSubmitter, cboTeamName.Text);
     if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38)
     {
         rbtn38.Checked = true;
     }
     else
     {
         rbtn46.Checked = true;
     }
     SetWorkTimeName();
     dgrdvDayReportJJ[C_WORK_CONTENT, 0].Value = Const_MS.JJ;
 }
Exemple #4
0
 /// <summary>
 ///     队别选择事件(根据队别绑定队员)
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void cboTeamName_SelectedIndexChanged(object sender, EventArgs e)
 {
     DataBindUtil.LoadTeamMemberByTeamName(cboSubmitter, ((Team)cboTeamName.SelectedItem).TeamName);
 }
Exemple #5
0
        private void MineDataSimple_Load(object sender, EventArgs e)
        {
            DataBindUtil.LoadTeam(cboTeamName);
            DataBindUtil.LoadTeamMemberByTeamName(cboSubmitter, cboTeamName.Text);
            DataBindUtil.LoadWorkTime(cboWorkTime,
                                      rbtn38.Checked ? Const_MS.WORK_GROUP_ID_38 : Const_MS.WORK_GROUP_ID_46);

            if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38)
            {
                rbtn38.Checked = true;
            }
            else
            {
                rbtn46.Checked = true;
            }
            // 设置班次名称
            SetWorkTimeName();

            //窗体绑定到Panel中
            _ventilationInfo.MdiParent   = this;
            _ventilationInfo.Parent      = panel2;
            _coalExistenceInfo.MdiParent = this;
            _coalExistenceInfo.Parent    = panel2;
            _gasData.MdiParent           = this;
            _gasData.Parent              = panel2;
            _management.MdiParent        = this;
            _management.Parent           = panel2;
            _geologicStructure.MdiParent = this;
            _geologicStructure.Parent    = panel2;

            //panel2绑定窗体
            panel2.Controls.Add(_coalExistenceInfo);
            panel2.Controls.Add(_ventilationInfo);
            panel2.Controls.Add(_gasData);
            panel2.Controls.Add(_management);
            panel2.Controls.Add(_geologicStructure);

            if (Tunnel != null)
            {
                selectTunnelSimple1.SetTunnel(Tunnel);
            }
            if (Team != null)
            {
                cboTeamName.SelectedText = Team.TeamName;
            }
            if (MineData != null)
            {
                selectTunnelSimple1.SetTunnel(MineData.Tunnel);
                txtCoordinateX.Text = MineData.Tunnel.WorkingFace.CoordinateX.ToString(CultureInfo.InvariantCulture);
                txtCoordinateY.Text = MineData.Tunnel.WorkingFace.CoordinateY.ToString(CultureInfo.InvariantCulture);
                txtCoordinateZ.Text = MineData.Tunnel.WorkingFace.CoordinateZ.ToString(CultureInfo.InvariantCulture);

                if (MineData.WorkStyle == "三八制")
                {
                    rbtn38.Checked = true;
                    rbtn46.Checked = false;
                }
                else
                {
                    rbtn46.Checked = true;
                    rbtn38.Checked = false;
                }
                cboWorkTime.SelectedValue = MineData.WorkTime;
                cboTeamName.SelectedText  = MineData.TeamName;
                cboSubmitter.SelectedText = MineData.Submitter;

                if (MineData is CoalExistence)
                {
                    var coalexistence = (CoalExistence)MineData;
                    _coalExistenceInfo.bindDefaultValue(coalexistence);
                    Height = FormHeight + _coalExistenceInfo.Height;
                    _coalExistenceInfo.WindowState = FormWindowState.Maximized;
                    _coalExistenceInfo.Show();
                    _coalExistenceInfo.Activate();
                }
                else if (MineData is GasData)
                {
                    var gasData = (GasData)MineData;
                    _gasData.bindDefaultValue(gasData);
                    Height = FormHeight + _gasData.Height;
                    _gasData.WindowState = FormWindowState.Maximized;
                    _gasData.Show();
                    _gasData.Activate();
                }
                else if (MineData is GeologicStructure)
                {
                    var geologicStructure = (GeologicStructure)MineData;
                    _geologicStructure.bindDefaultValue(geologicStructure);
                    Height = FormHeight + _geologicStructure.Height;
                    _geologicStructure.WindowState = FormWindowState.Maximized;
                    _geologicStructure.Show();
                    _geologicStructure.Activate();
                }
                else if (MineData is Ventilation)
                {
                    var ventilation = (Ventilation)MineData;
                    _ventilationInfo.bindDefaultValue(ventilation);
                    Height = FormHeight + _ventilationInfo.Height;
                    _ventilationInfo.WindowState = FormWindowState.Maximized;
                    _ventilationInfo.Show();
                    _ventilationInfo.Activate();
                }
                else if (MineData is Management)
                {
                    var management = (Management)MineData;
                    _management.bindDefaultValue(management);
                    Height = FormHeight + _management.Height;
                    _management.WindowState = FormWindowState.Maximized;
                    _management.Show();
                    _management.Activate();
                }
            }
            else
            {
                if (!String.IsNullOrWhiteSpace(Submitter))
                {
                    cboSubmitter.Text = Submitter;
                }

                if (Text == new LibPanels(MineDataPanelName.Ventilation_Change).panelFormName)
                {
                    _viEntity = (Ventilation)_obj;
                }
                if (Text == new LibPanels(MineDataPanelName.CoalExistence_Change).panelFormName)
                {
                    _ceEntity = (CoalExistence)_obj;
                }
                if (Text == new LibPanels(MineDataPanelName.GasData_Change).panelFormName)
                {
                    _gdEntity = (GasData)_obj;
                }
                if (Text == new LibPanels(MineDataPanelName.Management_Change).panelFormName)
                {
                    _mEntity = (Management)_obj;
                }
                if (Text == new LibPanels(MineDataPanelName.GeologicStructure_Change).panelFormName)
                {
                    _geologicStructureEntity = (GeologicStructure)_obj;
                }

                //所有小窗体最小化
                //AllMin();
                //通风
                if (Text == new LibPanels(MineDataPanelName.Ventilation).panelFormName)
                {
                    Height = FormHeight + _ventilationInfo.Height;
                    _ventilationInfo.WindowState = FormWindowState.Maximized;
                    _ventilationInfo.Show();
                    _ventilationInfo.Activate();
                }
                //煤层赋存
                if (Text == new LibPanels(MineDataPanelName.CoalExistence).panelFormName)
                {
                    Height = FormHeight + _coalExistenceInfo.Height;
                    _coalExistenceInfo.WindowState = FormWindowState.Maximized;
                    _coalExistenceInfo.Show();
                    _coalExistenceInfo.Activate();
                }
                //瓦斯
                if (Text == new LibPanels(MineDataPanelName.GasData).panelFormName)
                {
                    Height = FormHeight + _gasData.Height;
                    _gasData.WindowState = FormWindowState.Maximized;
                    _gasData.Show();
                    _gasData.Activate();
                }
                //管理
                if (Text == new LibPanels(MineDataPanelName.Management).panelFormName)
                {
                    Height = FormHeight + _management.Height;
                    _management.WindowState = FormWindowState.Maximized;
                    _management.Show();
                    _management.Activate();
                }
                //地质构造
                if (Text == new LibPanels(MineDataPanelName.GeologicStructure).panelFormName)
                {
                    Height = FormHeight + _geologicStructure.Height;
                    _geologicStructure.WindowState = FormWindowState.Maximized;
                    _geologicStructure.Show();
                    _geologicStructure.Activate();
                }

                //绑定通风修改初始信息
                if (Text == new LibPanels(MineDataPanelName.Ventilation_Change).panelFormName)
                {
                    Height = FormHeight + _ventilationInfo.Height;
                    ChangeMineCommonValue(_viEntity);

                    _ventilationInfo.VentilationEntity = _viEntity;

                    _ventilationInfo.bindDefaultValue(_viEntity);

                    _ventilationInfo.WindowState = FormWindowState.Maximized;
                    _ventilationInfo.Show();
                    _ventilationInfo.Activate();
                }

                //绑定煤层赋存修改初始信息
                if (Text == new LibPanels(MineDataPanelName.CoalExistence_Change).panelFormName)
                {
                    Height = FormHeight + _coalExistenceInfo.Height;
                    ChangeMineCommonValue(_ceEntity);

                    _coalExistenceInfo.coalExistenceEntity = _ceEntity;

                    _coalExistenceInfo.bindDefaultValue(_ceEntity);

                    _coalExistenceInfo.WindowState = FormWindowState.Maximized;
                    _coalExistenceInfo.Show();
                    _coalExistenceInfo.Activate();
                }

                //绑定瓦斯修改初始信息
                if (Text == new LibPanels(MineDataPanelName.GasData_Change).panelFormName)
                {
                    Height = FormHeight + _gasData.Height;
                    ChangeMineCommonValue(_gdEntity);

                    _gasData.GasDataEntity = _gdEntity;
                    _gasData.bindDefaultValue(_gdEntity);

                    _gasData.WindowState = FormWindowState.Maximized;
                    _gasData.Show();
                    _gasData.Activate();
                }
                //绑定管理修改初始信息
                if (Text == new LibPanels(MineDataPanelName.Management_Change).panelFormName)
                {
                    Height = FormHeight + _management.Height;
                    ChangeMineCommonValue(_mEntity);

                    _management.managementEntity = _mEntity;

                    _management.bindDefaultValue(_mEntity);

                    _management.WindowState = FormWindowState.Maximized;
                    _management.Show();
                    _management.Activate();
                }
                //绑定地质构造修改初始数据
                if (Text == new LibPanels(MineDataPanelName.GeologicStructure_Change).panelFormName)
                {
                    Height = FormHeight + _management.Height;
                    ChangeMineCommonValue(_geologicStructureEntity);

                    _geologicStructure.geoligicStructureEntity = _geologicStructureEntity;
                    _geologicStructure.bindDefaultValue(_geologicStructureEntity);

                    _geologicStructure.WindowState = FormWindowState.Maximized;
                    _geologicStructure.Show();
                    _geologicStructure.Activate();
                }
            }
        }