void LoadScreenData() { gcStoping.Visible = false; gcDevelopment.Visible = false; rpgSelection.Enabled = true; rpgShow.Enabled = true; rpgSave.Enabled = false; _clsBonusCaptureData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtProdMonth = _clsBonusCaptureData.GetProdMonth(); foreach (DataRow r in dtProdMonth.Rows) { ProdMonth = r["MillMonth"].ToString(); lueProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString());; } DataTable dtActivity = _clsBonusCaptureData.GetActivity(); rActivity.DataSource = dtActivity; rActivity.ValueMember = "Activity"; rActivity.DisplayMember = "Description"; DataTable dtSections = _clsBonusCaptureData.GetSections(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueProdMonth.EditValue.ToString()))); rSection.DataSource = dtSections; rSection.ValueMember = "SectionID"; rSection.DisplayMember = "Name"; }
private void frmResavePlanningProtocol_Load(object sender, EventArgs e) { //string ThePath = System.Environment.GetFolderPath(System.Environment.SpecialFolder.LocalApplicationData); //string path = string.Format(@"{0}\{1}_{2}.txt", ThePath, r["Prodmonth"], r["WorkPlaceID"]); //MessageBox.Show(ThePath); mwProdmonthEdit1.EditValue = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; if (BMEBL.get_Activity() == true) { // this.tscbShaft.Items.Add("MINE"); editActivity.Properties.DataSource = BMEBL.ResultsDataTable; editActivity.Properties.DisplayMember = "Desc"; editActivity.Properties.ValueMember = "Code"; editActivity.ItemIndex = 0; } updateSections(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(mwProdmonthEdit1.EditValue)), editActivity.EditValue.ToString()); DataStructure(); }
public void setProdMonth() { int ProdMonth; MWDataManager.clsDataAccess _dbMan = new MWDataManager.clsDataAccess(); _dbMan.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); //StringBuilder sb = new StringBuilder(); //sb.AppendLine("SELECT DISTINCT TOP 1 [Prodmonth] ProdMonth FROM [SECCAL] WHERE BeginDate <= CAST(GETDATE() AS DATE) and EndDate >= CAST(GETDATE() AS DATE)"); _dbMan.SqlStatement = "select case when pm1 is null then prodmonth else pm1 end as prodmonth from (select 'a' lbl, (year(getdate())*100) + month(getdate()) prodmonth ) a \r\n" + "left outer join \r\n" + "(SELECT DISTINCT TOP 1[Prodmonth] pm1, 'a' lbl \r\n" + "FROM[SECCAL] WHERE BeginDate <= CAST(GETDATE() AS DATE) and EndDate >= CAST(GETDATE() AS DATE)) b \r\n" + "on a.lbl = b.lbl "; _dbMan.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; _dbMan.queryReturnType = MWDataManager.ReturnType.DataTable; _dbMan.ExecuteInstruction(); DataTable SubB = _dbMan.ResultsDataTable; ProdMonth = Convert.ToInt32(SubB.Rows[0]["ProdMonth"].ToString()); editProdmonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString()); }
void LoadScreenData() { gcHoistingBooking.Visible = false; rpgSelection.Enabled = true; rpgInputs.Enabled = false; rpgShow.Enabled = true; rpgSave.Enabled = false; _clsHoistingBookingData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtMillMonth = _clsHoistingBookingData.GetMillMonth(); foreach (DataRow r in dtMillMonth.Rows) { MillMonth = r["MillMonth"].ToString(); lueMillMonth.EditValue = TProductionGlobal.ProdMonthAsDate(MillMonth.ToString());; } DataTable dtShaft = _clsHoistingBookingData.GetShaft(); rpItemShaft.DataSource = dtShaft; rpItemShaft.ValueMember = "OreflowID"; rpItemShaft.DisplayMember = "Name"; }
void LoadPlanningScreenData() { rpgSelection.Enabled = true; rpgShow.Enabled = true; rpgSave.Enabled = false; _clsTrammingPlanningData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtProdMonth = _clsTrammingPlanningData.GetProdMonth(); foreach (DataRow r in dtProdMonth.Rows) { prodMonth = r["Prodmonth"].ToString(); luePlanningProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(prodMonth.ToString());; } DataTable dtSections = _clsTrammingPlanningData.GetSections(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(luePlanningProdMonth.EditValue.ToString()))); rPlanningSections.DataSource = dtSections; rPlanningSections.ValueMember = "SectionID"; rPlanningSections.DisplayMember = "Name"; gvTrammingPlanning.PostEditor(); LookUpColumnInfoCollection collXC = LookupXC.Columns; collXC.Add(new LookUpColumnInfo("XC", 0)); LookUpColumnInfoCollection coll = LookupBoxHole.Columns; coll.Add(new LookUpColumnInfo("BH", 0)); }
private void frmPlanProtCpature_Load(object sender, EventArgs e) { updateSecurity(); barCaptureOptions.EditValue = "1"; captureOption = "1"; barProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); btnUnlockData.Enabled = true; CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; if (BMEBL.get_ReviseActivity() == true) { editActitivity.DataSource = BMEBL.ResultsDataTable; editActitivity.DisplayMember = "Desc"; editActitivity.ValueMember = "Code"; } LoadSections(); }
private void PlathondWallChartReportUserControl_Load(object sender, EventArgs e) { ActiveReport.UserCurrentInfo = this.UserCurrentInfo; reportSettings.Prodmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); iProdMonth.Properties.Value = reportSettings.Prodmonth; LoadSections(); reportSettings.Activity = "Stoping"; pgMeasuringList.SelectedObject = reportSettings; }
private void ucMODailyProduction_Load(object sender, EventArgs e) { ActiveReport.UserCurrentInfo = this.UserCurrentInfo; //reportSettings.ReportDate = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).Rundate; reportSettings.Prodmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); LoadSections(); reportSettings.SectionID = dtSections.Rows[0][0].ToString(); pgMODaily.SelectedObject = reportSettings; reportSettings.ReportDate = DateTime.Now; iReportDate.Properties.Value = reportSettings.ReportDate; }
private void ucRevisedPlanningAuditReport_Load(object sender, EventArgs e) { CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; reportSettings.FromProdmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); reportSettings.ToProdmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); DataTable section = new DataTable(); if (BMEBL.GetPlanSectionsAndNameADO(TProductionGlobal.ProdMonthAsString(reportSettings.FromProdmonth)) == true) { section = BMEBL.ResultsDataTable; rpSection.DataSource = BMEBL.ResultsDataTable; rpSection.DisplayMember = "NAME"; rpSection.ValueMember = "sectionid"; } reportSettings.sectionid = section.Rows[0]["sectionid"].ToString(); reportSettings.RevisedPlanningType = "All"; MWDataManager.clsDataAccess _RevisedOptions = new MWDataManager.clsDataAccess(); _RevisedOptions.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); _RevisedOptions.SqlStatement = "SELECT 0 Code, 'All' [RevisedPlanningType] " + "UNION " + "SELECT 1 Code, 'Stop Workplace' [RevisedPlanningType] " + "union " + "select 2 Code, 'New Workplace' [RevisedPlanningType] " + "union " + "select 3 Code, 'Crew Miner Changes' [RevisedPlanningType] " + "union " + "select 4 Code, 'Call Changes' [RevisedPlanningType] " + "union " + "select 5 Code, 'Move Planning' [RevisedPlanningType] " + "union " + "select 6 Code, 'Start Workplace' [RevisedPlanningType] " + "union " + "select 7 Code, 'Mining Method Change' [RevisedPlanningType] " + "union " + "select 8 Code, 'Drill Rig Change' [RevisedPlanningType] " + "union " + "select 9 Code, 'Delete Planning' [RevisedPlanningType] "; _RevisedOptions.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; _RevisedOptions.queryReturnType = MWDataManager.ReturnType.DataTable; _RevisedOptions.ExecuteInstruction(); rpRevisedPlanningType.DataSource = _RevisedOptions.ResultsDataTable; rpRevisedPlanningType.DisplayMember = "RevisedPlanningType"; rpRevisedPlanningType.ValueMember = "RevisedPlanningType"; pgRevisedPlanningAudit.SelectedObject = reportSettings; }
private void ucMeasuringListReport_Load(object sender, EventArgs e) { ActiveReport.UserCurrentInfo = this.UserCurrentInfo; // reportSettings.ReportDate = DateTime.Now; reportSettings.Prodmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); iProdMonth.Properties.Value = reportSettings.Prodmonth; LoadSections(); reportSettings.SectionID = dtSections.Rows[0][0].ToString(); reportSettings.Activity = "Stoping"; pgMeasuringList.SelectedObject = reportSettings; // theReport.Preview.Click += Preview_Click; }
private void ucWorstPerformerss_Load(object sender, EventArgs e) { ActiveReport.UserCurrentInfo = this.UserCurrentInfo; // reportSettings.ReportDate = DateTime.Now; // DateTime dt = new DateTime(); // reportSettings.Prodmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); MWDataManager.clsDataAccess _dbMan = new MWDataManager.clsDataAccess(); _dbMan.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); _dbMan.SqlStatement = "(SELECT MAX(MillMonth)MillMonth FROM CALENDARMILL WHERE StartDate <= GETDATE())"; _dbMan.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; _dbMan.queryReturnType = MWDataManager.ReturnType.DataTable; _dbMan.ExecuteInstruction(); DataTable dt = new DataTable(); dt = _dbMan.ResultsDataTable; foreach (DataRow dr in dt.Rows) { reportSettings.Prodmonth = TProductionGlobal.ProdMonthAsDate(dr["MillMonth"].ToString()); } // reportSettings.Prodmonth = Convert.ToInt32(TProductionGlobal.ProdMonthAsString(dt)); iProdmonth.Properties.Value = reportSettings.Prodmonth; LoadSections(); reportSettings.SectionID = dtSections.Rows[0][0].ToString(); //reportSettings.Crew = dtCrew.Rows[0][0].ToString(); reportSettings.Type = "MO Summary"; reportSettings.Meas = "Gold"; iType.Properties.Value = reportSettings.Type; iMeas.Properties.Value = reportSettings.Meas; reportSettings.Activity = 0; iActivity.Properties.Value = reportSettings.Activity; pgTopPanelsRepSettings.SelectedObject = reportSettings; if (reportSettings.Type == "MO Summary") { iCrew.Visible = false; //iSection.Visible = true; } else { iCrew.Visible = true; // iSection.Visible = false; } }
void LoadScreenData() { _clsLockMonthData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtProdMonth = _clsLockMonthData.GetProdMonth(); foreach (DataRow r in dtProdMonth.Rows) { ProdMonth = r["Prodmonth"].ToString(); luePlanningProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString()); //lueSurveyProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString()); } }
private void ucProblemAnalysisReport_Load(object sender, EventArgs e) { ActiveReport.UserCurrentInfo = this.UserCurrentInfo; reportSettings.FromProdmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); reportSettings.ToProdmonth = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); reportSettings.FromDate = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).Rundate; reportSettings.ToDate = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).Rundate; reportSettings.Period = "Prodmonth"; reportSettings.Sections = "Single"; reportSettings.Activity = "Stoping"; reportSettings.Type = "ProbDesc"; reportSettings.GraphInfo = "Potential"; reportSettings.Available = GetAvailableList(); reportSettings.Details = false; reportSettings.DetailsGraph = false; reportSettings.TrendGraph = false; reportSettings.PerShaft = false; reportSettings.LostBlasts = false; iFromProdmonth.Visible = true; iToProdmonth.Visible = true; iToDate.Visible = false; iFromDate.Visible = false; iSectionSelect.Enabled = false; GetAvailableData(); CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; _pmonth = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString(); DataTable section = new DataTable(); if (BMEBL.GetPlanSectionsAndNameADO(_pmonth) == true) { section = BMEBL.ResultsDataTable; riSectionSingle.DataSource = BMEBL.ResultsDataTable; riSectionSingle.DisplayMember = "NAME"; riSectionSingle.ValueMember = "NAME"; } reportSettings.NAME = section.Rows[0]["NAME"].ToString(); pgProblemAnalysis.SelectedObject = reportSettings; }
public void setProdMonth() { int ProdMonth; MWDataManager.clsDataAccess _dbMan = new MWDataManager.clsDataAccess(); _dbMan.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); StringBuilder sb = new StringBuilder(); sb.AppendLine("SELECT [CurrentProductionMonth] ProdMonth FROM [SYSSET]"); _dbMan.SqlStatement = sb.ToString(); _dbMan.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; _dbMan.queryReturnType = MWDataManager.ReturnType.DataTable; _dbMan.ExecuteInstruction(); DataTable SubB = _dbMan.ResultsDataTable; ProdMonth = Convert.ToInt32(SubB.Rows[0]["ProdMonth"].ToString()); editProdmonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString()); }
void LoadScreenData() { gcTopPanels.Visible = false; rpgSelection.Enabled = true; rpgShow.Enabled = true; rpgSave.Enabled = false; _clsTopPanelsData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtProdMonth = _clsTopPanelsData.GetProdMonth(); foreach (DataRow r in dtProdMonth.Rows) { ProdMonth = r["Prodmonth"].ToString(); lueProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(ProdMonth.ToString()); } DataTable dtSection = _clsTopPanelsData.GetSection(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueProdMonth.EditValue.ToString()))); rpSectionID.DataSource = dtSection; rpSectionID.ValueMember = "SectionID"; rpSectionID.DisplayMember = "Name"; }
void LoadBookingScreenData() { rpgSelection.Enabled = true; rpgShow.Enabled = true; rpgSave.Enabled = false; gcBookings.Visible = false; _clsTrammingBookingData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtProdMonth = _clsTrammingBookingData.GetProdMonth(); foreach (DataRow r in dtProdMonth.Rows) { prodMonth = r["Prodmonth"].ToString(); lueBookingProdMonth.EditValue = TProductionGlobal.ProdMonthAsDate(prodMonth.ToString());; } DataTable dtSections = _clsTrammingBookingData.GetSections(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueBookingProdMonth.EditValue.ToString()))); rpBookingSections.DataSource = dtSections; rpBookingSections.ValueMember = "SectionID"; rpBookingSections.DisplayMember = "Name"; }
private void ucAuthLockPlan_Load(object sender, EventArgs e) { switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAuthorisePlan_HPASLockPlanningAuthorise_MinewareSystemsHarmonyPAS.ItemID)) { case 0: case 1: gcAuthorize.OptionsColumn.AllowEdit = false; gcAuthorize.OptionsColumn.ReadOnly = true; gcDevAuth.OptionsColumn.AllowEdit = false; gcDevAuth.OptionsColumn.ReadOnly = true; gcSweepVampAuth.OptionsColumn.AllowEdit = false; gcSweepVampAuth.OptionsColumn.ReadOnly = true; gcSundryAuth.OptionsColumn.AllowEdit = false; gcSundryAuth.OptionsColumn.ReadOnly = true; break; case 2: gcAuthorize.OptionsColumn.AllowEdit = true; gcAuthorize.OptionsColumn.ReadOnly = false; gcDevAuth.OptionsColumn.AllowEdit = true; gcDevAuth.OptionsColumn.ReadOnly = false; gcSweepVampAuth.OptionsColumn.AllowEdit = true; gcSweepVampAuth.OptionsColumn.ReadOnly = false; gcSundryAuth.OptionsColumn.AllowEdit = true; gcSundryAuth.OptionsColumn.ReadOnly = false; break; } switch (TUserInfo.theSecurityLevel(ProductionGlobal.TProductionGlobal.WPASMenuStructure.miAuthorisePlan_HPASLockPlanningAuthorise_MinewareSystemsHarmonyPAS.ItemID)) { case 0: case 1: gcLocked.OptionsColumn.AllowEdit = false; gcLock.OptionsColumn.ReadOnly = true; gcDevLocked.OptionsColumn.AllowEdit = false; gcDevLocked.OptionsColumn.ReadOnly = true; gcSweepCampLock.OptionsColumn.AllowEdit = false; gcSweepCampLock.OptionsColumn.ReadOnly = true; gcLKD.OptionsColumn.AllowEdit = false; gcLKD.OptionsColumn.ReadOnly = true; break; case 2: gcLocked.OptionsColumn.AllowEdit = true; gcLock.OptionsColumn.ReadOnly = false; gcDevLocked.OptionsColumn.AllowEdit = true; gcDevLocked.OptionsColumn.ReadOnly = false; gcSweepCampLock.OptionsColumn.AllowEdit = true; gcSweepCampLock.OptionsColumn.ReadOnly = false; gcLKD.OptionsColumn.AllowEdit = true; gcLKD.OptionsColumn.ReadOnly = false; break; } Stopping.BestFitColumns(); //CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); //BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; //BMEBL.SetsystemDBTag = this.theSystemDBTag; //BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; _clsAuthLockPlanData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); updateSections(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth); DataTable dtActivity = _clsAuthLockPlanData.GetActivity(); editActivity.DataSource = dtActivity; editActivity.ValueMember = "Code"; editActivity.DisplayMember = "Desc"; productionmonth1.EditValue = TProductionGlobal.ProdMonthAsDate(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString()); gcTopend.ColumnEdit.EditValueChanged += gcTopend_ColumnEdit_EditValueChanged; gcLKD.ColumnEdit.EditValueChanged += gcLKD_ColumnEdit_EditValueChanged; }