Esempio n. 1
0
 /// <summary>
 /// Calling this method automatically opens the indicated form as a Mdi child form in the main form tabs.
 /// Exposes a way to open the Jobs Form from a Project outside of CDS.Client.Desktop.Workshop
 /// </summary>
 /// <param name="form">The form control to be displayed in the tabs.</param>
 /// <remarks>Created: Werner Scheffer 27/10/2014</remarks>
 public void ShowJobFormFromHeader(DB.SYS_DOC_Header header, bool allowChanges)
 {
     CDS.Client.Desktop.Workshop.Job.JobForm childForm = new Workshop.Job.JobForm();
     childForm.Doc_Header = header;
     childForm.Job_header = header.JOB_Header;
     childForm.ItemState  = CDS.Client.Desktop.Essential.BaseForm.EntityState.Generated;
     ShowForm(childForm);
 }
Esempio n. 2
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);
            }
        }