示例#1
0
 public void HideForm(CDS.Client.Desktop.Essential.BaseForm form, bool shouldHide)
 {
     try
     {
         foreach (DevExpress.XtraTabbedMdi.XtraMdiTabPage p in MdiManager.Pages)
         {
             if (p.MdiChild == form)
             {
                 if (shouldHide)
                 {
                     (p.MdiChild as CDS.Client.Desktop.Essential.BaseForm).MdiParent = null; //.Hide();
                     (p.MdiChild as CDS.Client.Desktop.Essential.BaseForm).Hide();
                 }
                 else
                 {
                     (p.MdiChild as CDS.Client.Desktop.Essential.BaseForm).MdiParent = this; //Show();
                     (p.MdiChild as CDS.Client.Desktop.Essential.BaseForm).Show();
                 }
                 break;
             }
         }
     }
     catch (Exception ex)
     {
         if (CDS.Shared.Exception.UserInterfaceExceptionHandler.HandleException(ref ex))
         {
             throw ex;
         }
     }
 }
示例#2
0
 /// <summary>
 /// Calling this method automatically opened the indicated form as a Mdi child form in the main form tabs.
 /// Exposes a way to open the Catalogue Form from a Project outside of CDS.Client.Desktop.Catalogue
 /// </summary>
 /// <param name="form">The form control to be displayed in the tabs.</param>
 /// <remarks>Created: Theo Crous 14/11/2011</remarks>
 public void ShowCatalogueForm(DB.VW_Company entity, CDS.Client.BusinessLayer.ORG.ORG_Type type, CDS.Client.Desktop.Essential.BaseForm form)
 {
     CDS.Client.Desktop.Catalogue.CAT.CatalogueForm childForm = new Catalogue.CAT.CatalogueForm();
     childForm.Entity = entity;
     childForm.Type   = type;
     childForm.Tag    = form;
     ShowForm(childForm);
 }
示例#3
0
        /// <summary>
        /// Call this method to Open an existing document.
        /// </summary>
        /// <param name="id">Primary key of the document you want to open.</param>
        /// <param name="typeId">Document type that you are opening.</param>
        /// <remarks>Created: Henko Rabie 29/01/2015</remarks>
        public void ShowDocumentForm(Int64 id, Int64 typeId)
        {
            CDS.Client.Desktop.Essential.BaseForm childForm = null;
            //TODO: Fill in the rest for the other document forms
            switch (typeId)
            {
            case (byte)BL.SYS.SYS_DOC_Type.Quote:
                childForm = new Document.Customer.QuoteForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.SalesOrder:
                childForm = new Document.Customer.SalesOrderForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.TAXInvoice:
                childForm = new Document.Customer.TAXInvoiceForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.CreditNote:
                childForm = new Document.Customer.CreditNoteForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.PickingSlip:

                break;

            case (byte)BL.SYS.SYS_DOC_Type.PurchaseOrder:
                childForm = new Document.Supplier.PurchaseOrderForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.GoodsReceived:
                childForm = new Document.Supplier.GoodsReceivedForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.GoodsReturned:
                childForm = new Document.Supplier.GoodsReturnedForm(id);
                break;

            //Werner: is this supposed to be here?
            case (byte)BL.SYS.SYS_DOC_Type.Job:
                childForm = new Workshop.Job.JobForm(id);
                break;

            case (byte)BL.SYS.SYS_DOC_Type.TransferRequest:

                break;

            case (byte)BL.SYS.SYS_DOC_Type.TransferShipment:

                break;

            case (byte)BL.SYS.SYS_DOC_Type.TransferReceived:

                break;

            case (byte)BL.SYS.SYS_DOC_Type.InventoryAdjustment:
                break;

            case (byte)BL.SYS.SYS_DOC_Type.BackOrder:
                childForm = new Document.Customer.BackOrderForm(id);
                break;
            }

            if (childForm != null)
            {
                ShowForm(childForm);
            }
        }