private void ShowDesigners() { try { //showDummy(); MdiChild designers = new MdiChild(); designers.Title = ApplicationTitle + " - Reports Designer"; ProcessDesigner.frmflxReports flxReports = new ProcessDesigner.frmflxReports(_userInformation, designers, StartDate, EndDate); designers.Content = flxReports; designers.Height = flxReports.Height + 40; designers.Width = flxReports.Width + 20; designers.MinimizeBox = true; designers.MaximizeBox = true; designers.Resizable = false; if (MainMDI.IsFormAlreadyOpen("Reports Designer") == false) { MainMDI.Container.Children.Add(designers); } else { designers = new MdiChild(); designers = (MdiChild)MainMDI.GetFormAlreadyOpened("Reports Designer"); MainMDI.SetMDI(designers); } } catch (Exception ex) { throw ex.LogException(); } }
public void ModifyUsers(DataRowView selecteditem) { try { //if (selecteditem != null && calledfromparentform.IsNotNullOrEmpty() && calledfromparentform == "MainWindow") //{ // Window win = new Window(); // IconBitmapDecoder ibd = new IconBitmapDecoder(new Uri(@"pack://application:,,/Images/logo.ico", UriKind.RelativeOrAbsolute), BitmapCreateOptions.None, BitmapCacheOption.Default); // win.Title = ApplicationTitle + " - " + "Cost Sheet Preparation"; // win.Icon = ibd.Frames[0]; // win.ResizeMode = ResizeMode.NoResize; // CI_INFO_PK = selecteditem["CI_INFO_PK"].ToValueAsString().ToIntValue(); // System.Windows.Controls.UserControl userControl = new ProcessDesigner.frmFRCS(_userInformation, win, CI_INFO_PK, OperationMode.Edit); // win.Content = userControl; // win.Height = userControl.Height + 50; // win.Width = userControl.Width + 10; // win.ShowInTaskbar = false; // win.WindowStartupLocation = WindowStartupLocation.CenterScreen; // win.ShowDialog(); //} //else if (selecteditem != null && calledfromparentform.IsNotNullOrEmpty() && calledfromparentform == "frmFRCS") //{ // CI_INFO_PK = selecteditem["CI_INFO_PK"].ToValueAsString().ToIntValue(); // CloseAction(); //} if (selecteditem == null) { return; } MdiChild mdiCostSheet = new MdiChild(); if (MainMDI.IsFormAlreadyOpen("Cost Sheet Preparation") == true) { mdiCostSheet = (MdiChild)MainMDI.GetFormAlreadyOpened("Cost Sheet Preparation"); mdiCostSheet.Close(); } CI_INFO_PK = selecteditem["CI_INFO_PK"].ToValueAsString().ToIntValue(); ProcessDesigner.frmFRCS userControl = new ProcessDesigner.frmFRCS(_userInformation, mdiCostSheet, CI_INFO_PK, OperationMode.Edit); //frmCostSheetSearch frmCostSheetSearch = new frmCostSheetSearch(_userInformation, mdiCostSheetSearch, ActiveEntity.IDPK, OperationMode.View, "frmFRCS"); mdiCostSheet.Title = ApplicationTitle + " - Cost Sheet Preparation"; mdiCostSheet.Content = userControl; mdiCostSheet.Height = userControl.Height + 40; mdiCostSheet.Width = userControl.Width + 20; mdiCostSheet.MinimizeBox = true; mdiCostSheet.MaximizeBox = true; mdiCostSheet.Resizable = false; MainMDI.Container.Children.Add(mdiCostSheet); //} //else //{ // mdiCostSheet = (MdiChild)MainMDI.GetFormAlreadyOpened("Cost Sheet Preparation"); // //toolschedule = (frmToolSchedule_new)mdiCostSheetSearch.Content; // MainMDI.SetMDI(mdiCostSheet); //} } catch (Exception ex) { throw ex.LogException(); } }