示例#1
0
        private void GridDetails_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            ProcessWindow pw = new ProcessWindow("Displaying File ...");

            try
            {
                //Para el selected Item despliega el archivo.
                if (GridDetails.SelectedItem == null)
                {
                    return;
                }

                ProcessEntityResource per = GridDetails.SelectedItem as ProcessEntityResource;
                if (per.Template != null)
                {
                    UtilWindow.ShowDocument(per.Template, per.EntityRowID, "", false);
                }

                else if (per.File != null)
                {
                    UtilWindow.ShowFile(per.File);
                }
            }
            catch (Exception ex) { Util.ShowError("Fiel could not be displayed.\n" + ex.Message); }
            finally { pw.Close(); }
        }
        private void OnProcessReplenish(object sender, EventArgs e)
        {
            //ViewRepPack.DgRepList.Items.Refresh();
            IList <ProductStock> list = ViewRepPack.Model.RepPackList
                                        .Where(f => f.PackStock > 0 && f.Mark == true)
                                        .ToList();

            ////foreach (Object obj in ViewRepPack.DgRepList.Items)
            //    if (((ProductStock)obj).Mark && ((ProductStock)obj).PackStock > 0)
            //        list.Add((ProductStock)obj);


            if (list.Count() == 0)
            {
                Util.ShowError("No record selected.");
                return;
            }

            ProcessWindow pw = new ProcessWindow("Creating Replenishment Order ... ");
            //1. Create a Replenishment order (new)
            Document repOrder = service.CreateReplenishOrder(list.ToList(), App.curUser.UserName, App.curLocation);

            pw.Close();

            //Refresh Document List.
            ViewRepPack.UCDocList.LoadDocuments("");

            Util.ShowMessage("Replenishment Order [" + repOrder.DocNumber + "] Created.");

            //Document to print
            UtilWindow.ShowDocument(repOrder.DocType.Template, repOrder.DocID, "", false);
        }
示例#3
0
 private void OnShowTicket(object sender, EventArgs e)
 {
     try
     {
         pw = new ProcessWindow("Generating Document ... ");
         UtilWindow.ShowDocument(View.Model.Document.DocType.Template, View.Model.HistDoc.DocID, "", false); //"PDF995"
         pw.Close();
     }
     catch { pw.Close(); }
 }
        void View_ShowShipTkt(object sender, EventArgs e)
        {
            ProcessWindow pw = new ProcessWindow(Util.GetResourceLanguage("GENERATING_DOCUMENT"));

            Document document = service.GetDocument(new Document {
                CustPONumber = View.Model.CurDoc.DocNumber
            }).First();

            UtilWindow.ShowDocument(document.DocType.Template, document.DocID, "", true);

            pw.Close();
        }
示例#5
0
 void View_ShowInitialTicket(object sender, EventArgs e)
 {
     try
     {
         pw = new ProcessWindow("Generating Document ... ");
         UtilWindow.ShowDocument(new LabelTemplate {
             Header = WmsSetupValues.CountTicketTemplate
         }, View.Model.Document.DocID, "", false);                                                                                         //"PDF995"
         pw.Close();
     }
     catch { pw.Close(); }
 }
        private void ShowTicket(Document document)
        {
            if (document == null)
            {
                return;
            }

            ProcessWindow pw = new ProcessWindow(Util.GetResourceLanguage("GENERATING_DOCUMENT"));

            UtilWindow.ShowDocument(document.DocType.Template, document.DocID, "", true);

            pw.Close();
        }
        private void imgTicket_MouseDown(object sender, MouseButtonEventArgs e)
        {
            if (lvOrders.SelectedItem == null)
            {
                Util.ShowError("Please select a record.");
                return;
            }

            ProcessWindow pw = new ProcessWindow("Generating Document ... ");

            //Open the Document Ticket
            try
            {
                UtilWindow.ShowDocument(CurDocumentType.Template, ((Document)lvOrders.SelectedItem).DocID, "", false);
                pw.Close();
            }
            catch { pw.Close(); }
        }
示例#8
0
        void View_ShowTicket(object sender, EventArgs e)
        {
            try
            {
                pw = new ProcessWindow("Generating Document ... ");
                UtilWindow.ShowDocument(View.Model.Document.DocType.Template, View.Model.Document.DocID, "", false); //"PDF995"

                /*
                 * // CAA [2010/07/06]
                 * // Genera distinto formato de impresión; según el estado del doc.
                 * // Posted? mostrar todo (summary y detail)...  Si no, solo Summary
                 * if (string.IsNullOrEmpty(Util.GetConfigOption("CTREPDETAIL")) || Util.GetConfigOption("CTREPDETAIL").Equals("F"))
                 *  UtilWindow.ShowDocument(View.Model.Document.DocType.Template, View.Model.Document.DocID, "", false); //"PDF995"
                 * else
                 *  if (View.Model.Document.DocStatus.StatusID == DocStatus.Posted)
                 *      UtilWindow.ShowDocument(new LabelTemplate { Header = WmsSetupValues.CountTicketTemplate_Full }, View.Model.Document.DocID, "", false);
                 *  else
                 *      UtilWindow.ShowDocument(new LabelTemplate { Header = WmsSetupValues.CountTicketTemplate_Summary  }, View.Model.Document.DocID, "", false);
                 */
                pw.Close();
            }
            catch { pw.Close(); }
        }