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 mwProdmonthEdit1_EditValueChanged(object sender, EventArgs e) { if (editActivity.EditValue != null) { updateSections(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(mwProdmonthEdit1.EditValue)), editActivity.EditValue.ToString()); } }
private void LoadSections() { DataTable _SectionResult = new DataTable(); GetSectionsAndName theData = new GetSectionsAndName { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; List <string> sections = TProductionGlobal.getUserInfo(UserCurrentInfo.Connection).PlanBookSections; foreach (string item in sections) { MWDataManager.clsDataAccess temp = theData.theSectionsAndName(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(barProdMonth.EditValue.ToString())), item, TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).MOHierarchicalID); temp.ExecuteInstruction(); if (temp.ResultsDataTable.Rows.Count != 0) { if (_SectionResult.Columns.Count == 0) { _SectionResult = temp.ResultsDataTable.Clone(); } _SectionResult.Merge(temp.ResultsDataTable); } } editListSections.DataSource = _SectionResult; editListSections.ValueMember = "SectionID"; editListSections.DisplayMember = "Name"; }
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 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 ParamLbl_TextChanged(object sender, EventArgs e) { if (ParamLbl.Text == ParamLbl1.Text) { //MessageBox.Show("Please enter the Problem Id", "Insufficient information", MessageBoxButtons.OK, MessageBoxIcon.Information); } else { ParamLbl1.Text = ParamLbl.Text; if (ParamLbl.Text != "") { measure.MLPMLbl.Text = TProductionGlobal.ProdMonthAsString(reportSettings.Prodmonth); measure.MLACTLbl.Text = ParamLbl.Text.Substring(0, 1); measure.MLWPLbl.Text = procs.ExtractAfterColon(ParamLbl.Text + " ".Substring(2, 30)).Trim(); measure.MLSecLbl.Text = procs.ExtractBeforeColon(ParamLbl.Text).Trim(); measure.MLSecLbl.Text = measure.MLSecLbl.Text + " "; measure.MLSecLbl.Text = measure.MLSecLbl.Text.Substring(1, 10); measure.MLSecLbl.Text = measure.MLSecLbl.Text.Trim(); measure.Connection = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); measure.ShowDialog(); //MsgFrm.Text = "Record Inserted"; //Procedures.MsgText = "Problem Group Added"; //MsgFrm.Show(); // showBtn_Click(null, null); } } }
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 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(); }
void LoadPlanningLockData() { DataTable dtPlanningLockData = _clsLockMonthData.GetPlanningLockData( TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(luePlanningProdMonth.EditValue.ToString()))); gcPlanningLock.DataSource = dtPlanningLockData; }
private DataTable loadIndicatestatus() { MWDataManager.clsDataAccess _DataStatus = new MWDataManager.clsDataAccess(); _DataStatus.ConnectionString = TConnections.GetConnectionString(systemDBTag, UserCurrentInfo.Connection); _DataStatus.SqlStatement = "SELECT 'L' theStatus, COUNT(Plancode) TheCount FROM PLANMONTH a inner join Section_complete b on \n" + "a.prodmonth = b.Prodmonth and \n" + "a.Sectionid = b.SectionID \n" + "WHERE SectionID_2 = '" + SECTIONID_2 + "' and \n" + "a.Prodmonth = " + TProductionGlobal.ProdMonthAsString(Prodmonth) + " and \n" + "Activity = " + Code + " and \n" + "Plancode = 'MP' AND LOCKED=1\n" + "UNION \n" + "SELECT 'D' theStatus,COUNT(Plancode) TheCount FROM PLANMONTH a inner join Section_complete b on \n" + "a.prodmonth = b.Prodmonth and \n" + "a.Sectionid = b.SectionID\n" + "WHERE SectionID_2 = '" + SECTIONID_2 + "' and \n" + "a.Prodmonth = " + TProductionGlobal.ProdMonthAsString(Prodmonth) + " and \n" + "Activity = " + Code + " and \n" + "Plancode='MP' AND LOCKED=0"; _DataStatus.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; _DataStatus.queryReturnType = MWDataManager.ReturnType.DataTable; _DataStatus.ExecuteInstruction(); return(_DataStatus.ResultsDataTable); }
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()); }
public void LoggedOn() { // Use this section to load all module settings like user logon info or production info //TProductionGlobal.get(resWPAS .systemDBTag,TUserInfo .Connection ); TProductionGlobal.SetProductionGlobalInfo(resWPAS.systemDBTag); TProductionGlobal.getSystemSettingsProductioInfo(resWPAS.systemDBTag); TProductionGlobal.SetUserInfo(resWPAS.systemDBTag); //TProductionGlobal.getUserInfo(resWPAS.systemDBTag); }
private void btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { _clsMillingBookingData.SavePlannedData(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueMillMonth.EditValue.ToString())), lueMill.EditValue.ToString(), Convert.ToInt32(txtTonsTreated.EditValue), Convert.ToInt32(txtTonsToPlant.EditValue)); LoadMillingData(); }
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 btnSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { _clsHoistingBookingData.SaveData(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueMillMonth.EditValue.ToString())), lueShaft.EditValue.ToString(), Convert.ToInt32(txtPlanHoistTons.EditValue), Convert.ToDecimal(txtPlanBeltGrade.EditValue), Convert.ToInt32(txtPlanGold.EditValue)); LoadHoistingData(); }
private void ucPlannedVsBooked_Load(object sender, EventArgs e) { try { reportSettings.Type = "Tons"; reportSettings.ShowType = "Both"; reportSettings.CastType = "Both"; reportSettings.MSType = "All"; reportSettings.WhatMonth = "Production Month"; CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; DataTable dtActivityData = BMEBL.GetActivityReports(); rpActivity.DataSource = dtActivityData; rpActivity.DisplayMember = "Desc"; rpActivity.ValueMember = "Code"; reportSettings.UserCurrentInfo = this.UserCurrentInfo; reportSettings.systemDBTag = this.theSystemDBTag; reportSettings.pmonth = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth.ToString(); int theYear = Convert.ToInt32(reportSettings.pmonth.Substring(0, 4)); int theMonth = Convert.ToInt32(reportSettings.pmonth.Substring(4, 2)); DateTime theDate = new DateTime(theYear, theMonth, 1); reportSettings.Prodmonth = theDate.Date; reportSettings.UpdateSumOnRequest += reportSettings_UpdateSumOnRequest; reportSettings.Showuntil = DateTime.Now; iShowuntil.Properties.Value = reportSettings.Showuntil; reportSettings.Desc = "0"; iProdmonth.Properties.Value = reportSettings.Prodmonth.ToString(); DataTable dtSectionData = new DataTable(); if (BMEBL.GetPlanSectionsAndNameADO(reportSettings.pmonth) == true) { dtSectionData = BMEBL.ResultsDataTable; rpSectionid.DataSource = BMEBL.ResultsDataTable; rpSectionid.DisplayMember = "NAME"; rpSectionid.ValueMember = "NAME"; } reportSettings.NAME = dtSectionData.Rows[0]["NAME"].ToString(); pgPlanVsBookSettings.SelectedObject = reportSettings; } catch (Exception) { throw; } }
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 btnBookingSave_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e) { _clsTrammingBookingData.SaveTrammingBooking(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueBookingProdMonth.EditValue.ToString())), cbBookingSections.EditValue.ToString(), Convert.ToDateTime(dteDate.EditValue.ToString()), dtTrammingBookingData); dtTrammingBookingData = _clsTrammingBookingData.GetTrammingBookingData(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueBookingProdMonth.EditValue.ToString())), cbBookingSections.EditValue.ToString(), Convert.ToDateTime(dteDate.EditValue.ToString())); gcBookings.DataSource = dtTrammingBookingData; rpgSelection.Enabled = false; rpgShow.Enabled = false; rpgSave.Enabled = true; }
void LoadTopPanels() { gcTopPanels.Visible = true; _clsTopPanelsData.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable dtTopPanels = _clsTopPanelsData.GetTopPanelsData(TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueProdMonth.EditValue.ToString())), lueSectionID.EditValue.ToString()); gcTopPanels.DataSource = dtTopPanels; }
public void info(string changed, string dept, string SECTION, string USER, string sectype) { hasChanged = changed; department = dept; //editUser.EditValue = USER; //editSection.EditValue = SECTION; // editSection.Properties.NullText = SECTION; if (sectype == "1") { // layoutControlItem4.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; layoutControlItem5.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Always; // } else { if (sectype == "2") { layoutControlItem5.Visibility = DevExpress.XtraLayout.Utils.LayoutVisibility.Never; } } // } if (hasChanged == "2") { editUser.Enabled = false; } else { editUser.Enabled = true; } RSDB.UserCurrentInfo = UserCurrentInfo; RSDB.theData.ConnectionString = TConnections.GetConnectionString(theSystemDBTag, UserCurrentInfo.Connection); DataTable SectionList = RSDB.GetSections(TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth); DataTable UserList = RSDB.GetUserList(department); DataTable SecurityType = RSDB.GetSecurityType(); editSection.Properties.DataSource = SectionList; editSection.Properties.DisplayMember = "Name"; editSection.Properties.ValueMember = "ID"; //editSection.EditValue = SectionList.Rows[0][0]; editUser.Properties.DataSource = UserList; editUser.Properties.ValueMember = "UserID"; editUser.Properties.DisplayMember = "UserName"; //editUser.EditValue = UserList.Rows[0][0]; editSecurity.Properties.DataSource = SecurityType; editSecurity.Properties.ValueMember = "SecurityType"; editSecurity.Properties.DisplayMember = "Description"; //editSecurity.EditValue = SecurityType.Rows[0][0]; }
private void ucSundryMiningMeasurements_Load(object sender, EventArgs e) { prodmonth1.EditValue = TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).CurrentProductionMonth; setSections(); LoadSundryMiningDescription(); LoadMiningMethod(); rpPreplanning.Visible = true; rpReplanning.Visible = false; MainGrid.Visible = false; panelControl1.Visible = false; }
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; }
public DataTable loadIfEditId(string editid, string division) { theData.SqlStatement = "select c.*, b.name name1, e.OreFlowID lvl,e.OreFlowID Ore, e.name lvlname, r.ReefID, r.Description, e.Division Division from oreflowentities c left outer join (select * from section " + " where prodmonth = '" + TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).ProdMonth.ToString() + "'" + " ) b on c.sectionid = b.sectionid " + "left outer join oreflowentities e on c.parentoreflowid = e.oreflowid " + "left outer join Reef r on c.ReefType = convert(varchar(10), r.ReefID) " + "where c.oreflowid = '" + editid + "' and c.Division = '" + division + "' "; theData.queryExecutionType = MWDataManager.ExecutionType.GeneralSQLStatement; theData.queryReturnType = MWDataManager.ReturnType.DataTable; theData.ExecuteInstruction(); return(theData.ResultsDataTable); }
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()); } }
public void updateSections(int prodMonth) { CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; if (BMEBL.get_Sections(Convert.ToString(prodMonth), TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).MOHierarchicalID.ToString()) == true) { editMineoverseer1.DataSource = BMEBL.ResultsDataTable; editMineoverseer1.DisplayMember = "Name"; editMineoverseer1.ValueMember = "Name"; } }
private void gvTopPanels_RowUpdated(object sender, DevExpress.XtraGrid.Views.Base.RowObjectEventArgs e) { var workplaceID = gvTopPanels.GetRowCellValue(gvTopPanels.FocusedRowHandle, gvTopPanels.Columns["WPID"]).ToString(); var activity = gvTopPanels.GetRowCellValue(gvTopPanels.FocusedRowHandle, gvTopPanels.Columns["Activity"]).ToString(); var selected = gvTopPanels.GetRowCellValue(gvTopPanels.FocusedRowHandle, gvTopPanels.Columns["Selected"]).ToString(); _clsTopPanelsData.SaveData(Convert.ToBoolean(selected), TProductionGlobal.ProdMonthAsString(Convert.ToDateTime(lueProdMonth.EditValue.ToString())), lueSectionID.EditValue.ToString(), workplaceID.ToString(), activity.ToString()); LoadTopPanels(); }
private void setSections() { CPMBusinessLayer.clsBusinessLayer BMEBL = new CPMBusinessLayer.clsBusinessLayer(); BMEBL._queryReturnType = CPMBusinessLayer.ReturnType.DataTable; BMEBL.SetsystemDBTag = this.theSystemDBTag; BMEBL.SetUserCurrentInfo = this.UserCurrentInfo; if (BMEBL.get_Sections(Convert.ToString(prodmonth1.EditValue), TProductionGlobal.getSystemSettingsProductioInfo(UserCurrentInfo.Connection).MOHierarchicalID.ToString()) == true) { editSection.DataSource = BMEBL.ResultsDataTable; editSection.DisplayMember = "Name"; editSection.ValueMember = "SectionID"; } }
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; }