Пример #1
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();
 }
Пример #2
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;
 }
Пример #3
0
 public SetDefaultValue(UnderMessageWindow form)
 {
     InitializeComponent();
     _superForm = form;
     DataBindUtil.LoadTeam(cboTeamName);
     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;
     }
     cboWorkTime.Text =
         DataBindUtil.JudgeWorkTimeNow(rbtn38.Checked ? Const_MS.WORK_TIME_38 : Const_MS.WORK_TIME_46);
 }
Пример #4
0
        /// <summary>
        ///     初始化
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TunnelJJHC_Load(object sender, EventArgs e)
        {
            DataBindUtil.LoadTeam(cboTeamName);

            if (Text == Const_GM.TUNNEL_JJ_CHANGE)
            {
                bindInfo();
            }

            if (rbtnJJN.Checked)
            {
                dtpStopDate.Enabled = false;
            }

            cboTeamName.DropDownStyle = ComboBoxStyle.DropDownList;

            cboWorkTime.DropDownStyle = ComboBoxStyle.DropDownList;
        }
Пример #5
0
        private void Form_TunnelHCEntering_Load(object sender, EventArgs e)
        {
            //绑定队别名称
            DataBindUtil.LoadTeam(cboTeamName);

            if (Text == Const_GM.TUNNEL_HC_CHANGE)
            {
                BindInfo();
            }
            if (rbtnHCN.Checked)
            {
                dtpStopDate.Enabled = false;
            }

            cboTeamName.DropDownStyle = ComboBoxStyle.DropDownList;

            cboWorkTime.DropDownStyle = ComboBoxStyle.DropDownList;

            btnChooseOther.Enabled = false;
        }
Пример #6
0
        /// <summary>
        ///     添加队别
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnAddTeamInfo_Click(object sender, EventArgs e)
        {
            TeamInfoEntering teamInfoForm;

            if (cboTeamName.Text == "")
            {
                teamInfoForm = new TeamInfoEntering();
            }
            else
            {
                var teamEntity = new Team {
                    TeamId = Convert.ToInt32(cboTeamName.SelectedValue)
                };
                teamEntity   = Team.Find(teamEntity.TeamId);
                teamInfoForm = new TeamInfoEntering(teamEntity);
            }

            if (DialogResult.OK == teamInfoForm.ShowDialog())
            {
                DataBindUtil.LoadTeam(cboTeamName);
            }
        }
Пример #7
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();
                }
            }
        }