private void ShowProductInformation()
        {
            try
            {
                if (SelectedRow != null)
                {
                    if (_perfOption == performanceOption.PartNumberAllotted || _perfOption != performanceOption.DocumentReleased || _perfOption != performanceOption.SampleSubmitted)
                    {
                        string part_no = string.Empty;
                        if (SelectedRow.DataView.Table.Columns.Contains("COLUMN0"))
                        {
                            part_no = SelectedRow["COLUMN0"].ToValueAsString();
                        }
                        if (!part_no.IsNotNullOrEmpty())
                        {
                            return;
                        }

                        ProductInformation bll          = new ProductInformation(_userInformation);
                        PRD_MAST           parentEntity = bll.GetEntityByPartNumber(new PRD_MAST()
                        {
                            PART_NO = part_no
                        });

                        MdiChild frmProductInformationChild = new MdiChild
                        {
                            Title       = ApplicationTitle + " - Product Master - " + part_no,
                            MaximizeBox = false,
                            MinimizeBox = false
                        };

                        ProcessDesigner.frmProductInformation productInformation = new ProcessDesigner.frmProductInformation(_userInformation,
                                                                                                                             frmProductInformationChild, parentEntity.IDPK, OperationMode.Edit);
                        frmProductInformationChild.Content = productInformation;
                        frmProductInformationChild.Height  = productInformation.Height + 50;
                        frmProductInformationChild.Width   = productInformation.Width + 20;
                        MainMDI.Container.Children.Add(frmProductInformationChild);
                    }
                }
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }
示例#2
0
        private void ShowProductInformation()
        {
            try
            {
                //    public frmProductInformation(UserInformation userInformation, WPF.MDI.MdiChild mdiChild, int entityPrimaryKey,
                //OperationMode operationMode, string title = "Feasibility Report and Cost Sheet")

                //return;
                if (SelectedPartRow != null)
                {
                    string part_no = string.Empty;
                    if (SelectedPartRow.DataView.Table.Columns.Contains("PART_NO"))
                    {
                        part_no = SelectedPartRow["PART_NO"].ToValueAsString();
                    }
                    if (!part_no.IsNotNullOrEmpty())
                    {
                        return;
                    }

                    ProductInformation bll          = new ProductInformation(_userInformation);
                    PRD_MAST           parentEntity = bll.GetEntityByPartNumber(new PRD_MAST()
                    {
                        PART_NO = part_no
                    });

                    //Window win = new Window();
                    //win.Title = ApplicationTitle + " - Prodcut Master";

                    //System.Windows.Media.Imaging.IconBitmapDecoder ibd = new System.Windows.Media.Imaging.IconBitmapDecoder(new Uri(@"pack://application:,,/Images/logo.ico", UriKind.RelativeOrAbsolute), System.Windows.Media.Imaging.BitmapCreateOptions.None, System.Windows.Media.Imaging.BitmapCacheOption.Default);

                    //win.Icon = ibd.Frames[0];
                    //win.ResizeMode = ResizeMode.NoResize;
                    //ProcessDesigner.frmProductInformation userControl = new ProcessDesigner.frmProductInformation(_userInformation, win, parentEntity.IDPK, OperationMode.Edit, win.Title);
                    //win.Content = userControl;
                    //win.Height = userControl.Height + 50;
                    //win.Width = userControl.Width + 10;
                    //win.ShowInTaskbar = false;
                    //win.WindowStartupLocation = WindowStartupLocation.CenterScreen;
                    //win.ShowDialog();


                    MdiChild frmProductInformationChild = new MdiChild
                    {
                        Title       = ApplicationTitle + " - Product Master",
                        MaximizeBox = false,
                        MinimizeBox = false
                    };

                    ProcessDesigner.frmProductInformation productInformation = new ProcessDesigner.frmProductInformation(_userInformation,
                                                                                                                         frmProductInformationChild, parentEntity.IDPK, OperationMode.Edit);
                    frmProductInformationChild.Content = productInformation;
                    frmProductInformationChild.Height  = productInformation.Height + 50;
                    frmProductInformationChild.Width   = productInformation.Width + 20;
                    MainMDI.Container.Children.Add(frmProductInformationChild);
                }
            }
            catch (Exception ex)
            {
                throw ex.LogException();
            }
        }