示例#1
0
        private void execute <Object>(Object obj)
        {
            string st = obj as string;

            switch (st)
            {
            case "ValidateInvoice":
            {
                T_Helper.InvoiceSell.Validate(Invoice_ID, money_paid, Description);
            }
            break;

            case "PrintInvoice":
            {
                var p_kvp = new List <KeyValuePair <string, string> >()
                {
                    new KeyValuePair <string, string>("pName", T_Helper.user.thisUser.NAME),
                    new KeyValuePair <string, string>("pImage", F_Image.PictureCompanyGetbase64()),
                };
                var productsViews = T_Helper.productSell.GetProductsFromInvoice(Invoice_ID).ToList();
                Printing.PrintInvoice(productsViews, p_kvp);
            }
            break;

            case "SaveInvoicePDF":
            {
                var p_kvp = new List <KeyValuePair <string, string> >()
                {
                    new KeyValuePair <string, string>("pName", T_Helper.user.thisUser.NAME),
                    new KeyValuePair <string, string>("pImage", F_Image.PictureCompanyGetbase64()),
                };
                var productsViews = T_Helper.productSell.GetProductsFromInvoice(Invoice_ID).ToList();
                Printing.SaveInvoice(productsViews, p_kvp);
            }
            break;

            default: break;
            }
        }