public void gvRequests1_RowClick_1(object sender, DevExpress.XtraGrid.Views.Grid.RowClickEventArgs e) { //focusControle1.Controls.Clear(); _RequestList1.ResultsDataTable.AcceptChanges(); gcRequestList.DataSource = _RequestList1.ResultsDataTable; gvRequests.RefreshData(); // focusControle1.Focus(); int DSRow = gvRequests.GetDataSourceRowIndex(e.RowHandle); if (DSRow >= 0) { //focusControle1.Controls.Clear(); ReplanningTypes ReplanningTypes = new ReplanningTypes(); replanningType theType = ReplanningTypes.getReplanningType(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeID"].ToString())); switch (theType) { case replanningType.rpStopWp: ucRequeststatus ucr = new ucRequeststatus(); // ucr.Controls.Find("btnApprove", true)[0].Enabled = true; //frm1.btnApprove.Enabled = true; // btnApprove.Enabled = true; ucStopWorkplace ucStopWorkplace = new ucStopWorkplace { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucStopWorkplace.Parent = focusControle1; ucStopWorkplace.Dock = DockStyle.Fill; ucStopWorkplace.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); break; case replanningType.rpCrewChnages: // ucRequeststatus ucr2 = new ucRequeststatus(); // ucr2.Controls["btnApprove"].Enabled = true; // frmPrePlanningMain frm1 = new frmPrePlanningMain(); // frm1.Controls["btnApprove"].Enabled = true; //ucr2.Controls.Find("btnApprove", true)[0].Enabled = true; // btnApprove.Enabled = true; ucCrewMinerChange ucCrewMinerChange = new ucCrewMinerChange { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucCrewMinerChange.Parent = focusControle1; ucCrewMinerChange.Dock = DockStyle.Fill; ucCrewMinerChange.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); break; case replanningType.rpNewWP: // ucRequeststatus ucr3 = new ucRequeststatus(); // ucr3.Controls.Find("btnApprove", true)[0].Enabled = true; // frmPrePlanningMain frm2 = new frmPrePlanningMain(); // frm2.Controls["btnApprove"].Enabled = true; // btnApprove.Enabled = true; //frm1.btnApprove.Enabled = true; ucAddWorkplace ucAddWorkplace = new ucAddWorkplace { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucAddWorkplace.Parent = focusControle1; ucAddWorkplace.Dock = DockStyle.Fill; ucAddWorkplace.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); break; case replanningType.rpCallCahnges: // ucRequeststatus ucr4 = new ucRequeststatus(); //ucr4.Controls.Find("btnApprove", true)[0].Enabled = true; ucPrePlanningMain frm3 = new ucPrePlanningMain(); // frm3.rpReplanningStatus.Ribbon.Controls["btnApprove"].Enabled = true; //frm3.btnApprove.Enabled = true; // frm1.btnApprove.Enabled = true; // frm3.Controls["btnApprove"].Enabled = true; // btnApprove.Enabled = true; ucPlanningValueChanges ucPlanningValueChanges = new ucPlanningValueChanges { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucPlanningValueChanges.Parent = focusControle1; ucPlanningValueChanges.Dock = DockStyle.Fill; ucPlanningValueChanges.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); frm3.btnEnabled(); break; case replanningType.rpMoveWP: ucPrePlanningMain frm31 = new ucPrePlanningMain(); MoveBookings ucMoveBookings = new MoveBookings { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucMoveBookings.Parent = focusControle1; ucMoveBookings.Dock = DockStyle.Fill; ucMoveBookings.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); frm31.btnEnabled(); break; case replanningType.rpStartWP: ucPrePlanningMain frm32 = new ucPrePlanningMain(); StartWorkplace StartWP = new StartWorkplace { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); StartWP.Parent = focusControle1; StartWP.Dock = DockStyle.Fill; StartWP.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); frm32.btnEnabled(); break; case replanningType.rpMiningMethodChange: ucPrePlanningMain frm3111 = new ucPrePlanningMain(); ucMiningMethodChange ucMMChange = new ucMiningMethodChange { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucMMChange.Parent = focusControle1; ucMMChange.Dock = DockStyle.Fill; ucMMChange.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); // frm311.btnEnabled(); break; case replanningType.rpDrillRig: ucPrePlanningMain frm31111 = new ucPrePlanningMain(); ucDrillRiggChanges ucDRChange = new ucDrillRiggChanges { theSystemDBTag = this.theSystemDBTag, UserCurrentInfo = this.UserCurrentInfo }; focusControle1.Controls.Clear(); ucDRChange.Parent = focusControle1; ucDRChange.Dock = DockStyle.Fill; ucDRChange.LoadDetails(Convert.ToInt32(_RequestList1.ResultsDataTable.Rows[DSRow]["ChangeRequestID1"].ToString())); // frm311.btnEnabled(); break; } } else { focusControle1.Controls.Clear(); gcRequestList.Visible = false; focusControle1.Visible = false; labelControl2.Visible = false; Visible = false; } }