/*************************************/ public TunnelHChuanEntering(TunnelHChuanManagement frmhc) { frmStop = frmhc; InitializeComponent(); //窗体属性设置 FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.TUNNEL_HCHUAN_ADD); //默认回采未完毕 rbtnHChuanN.Checked = true; //默认工作制式选择 if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38) { rbtn38.Checked = true; } else { rbtn46.Checked = true; } ////返回当前 //cboWorkTime.Text = WorkTime.returnSysWorkTime(rbtn38.Checked ? Const_MS.WORK_TIME_38 : Const_MS.WORK_TIME_46); // 设置班次名称 setWorkTimeName(); }
/// <summary> /// 初始化 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void WorkTime_Load(object sender, EventArgs e) { //日期控件隐藏 _dtp.Visible = false; //日期格式 _dtp.Format = DateTimePickerFormat.Custom; _dtp.CustomFormat = Const_MS.WORK_TIME_FORMAT; //改变datetimepicker样式 _dtp.ShowUpDown = true; //日期改变事件 _dtp.TextChanged += dtp_TextChanged; dgrdvWorkTime.Controls.Add(_dtp); if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38) { rbtn38.Checked = true; } else { rbtn46.Checked = true; } _workingTimes38 = WorkingTime.FindAllBy38Times(); _workingTimes46 = WorkingTime.FindAllBy46Times(); }
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(); }
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; }
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); }
/*************************************/ /// <summary> /// 构造方法 /// </summary> public TunnelJjEntering() { InitializeComponent(); //默认选择未掘进完毕 rbtnJJN.Checked = true; //默认工作制式选择 if (WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId == Const_MS.WORK_GROUP_ID_38) { rbtn38.Checked = true; } else { rbtn46.Checked = true; } // 设置班次名称 setWorkTimeName(); //设置窗体属性 FormDefaultPropertiesSetter.SetEnteringFormDefaultProperties(this, Const_GM.TUNNEL_JJ_ADD); }
QueryLastedPreWarningResult(string time) { var tunnels = Tunnel.FindAllWithHasRules(); var shift = MineDataSimpleBLL.selectWorkTimeNameByWorkTimeGroupIdAndSysTime( WorkingTimeDefault.FindFirst().DefaultWorkTimeGroupId, time); return(tunnels.Select(tunnel => new PreWarningResultQuery { DateTime = Convert.ToDateTime(time), Date_Shift = shift, TunnelID = tunnel.TunnelId, TunelName = GetTunelNameByTunelID(tunnel.TunnelId), WorkingfaceId = tunnel.WorkingFace.WorkingFaceId, WorkingfaceName = tunnel.WorkingFace.WorkingFaceName, OutBrustWarningResult = new WarningResultEnt { WarningResult = (int)WarningResult.GREEN, Coal = (int)WarningResult.GREEN, Gas = (int)WarningResult.GREEN, Geology = (int)WarningResult.GREEN, Management = (int)WarningResult.GREEN, Ventilation = (int)WarningResult.GREEN, HandleStatus = 0, }, OverLimitWarningResult = new WarningResultEnt { WarningResult = (int)WarningResult.GREEN, Coal = (int)WarningResult.GREEN, Gas = (int)WarningResult.GREEN, Geology = (int)WarningResult.GREEN, Management = (int)WarningResult.GREEN, Ventilation = (int)WarningResult.GREEN, HandleStatus = 0, } }).ToList()); }
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(); } } }