Example #1
0
        private void cmdAddMenu_Click(object sender, RoutedEventArgs e)
        {
            String name = (sender as MenuItem).Name;

            String qtype = "1";

            if (name.Equals("mnuDetail"))
            {
                qtype = "2";
            }

            String caption = (sender as MenuItem).Header.ToString();

            if (!CHelper.VerifyAccessRight("SALE_QUOTATION_ADD"))
            {
                return;
            }

            WinAddEditQuotation w = new WinAddEditQuotation("A", itemSources, null, docType, qtype);

            w.Caption = CLanguage.getValue("add") + " " + caption;
            w.ShowDialog();
            if (w.IsPreviewNeed)
            {
                WinFormPrinting wp = new WinFormPrinting("grpPurchasePO", getDocumentObject(w.CreatedID));
                wp.ShowDialog();
            }
        }
Example #2
0
        private void showEditWindow()
        {
            String caption = CLanguage.getValue("sale_quotation");

            if (!CHelper.VerifyAccessRight("SALE_QUOTATION_VIEW"))
            {
                return;
            }

            MAuxilaryDoc v = (MAuxilaryDoc)currentObj;

            WinAddEditQuotation w = new WinAddEditQuotation("E", itemSources, v, docType, "2");

            w.Caption = CLanguage.getValue("edit") + " " + caption;
            w.ShowDialog();

            if (w.IsPreviewNeed)
            {
                WinFormPrinting wp = new WinFormPrinting("grpSaleQuotation", getDocumentObject(w.CreatedID));
                wp.ShowDialog();
            }
        }