Ejemplo n.º 1
0
        public ActionResult Delete(int?invoiceId, int?masterCustomerId = null)
        {
            InvoiceItemModel invoiceItemModel = new InvoiceItemModel()
            {
                IsSecurityOperations = this.IsSecurityOperations,
                Invoice          = new InvoiceViewModel(),
                ControllerAction = "Delete",
                MasterCustomerId = masterCustomerId
            };

            try
            {
                InvoiceDTO invoiceDTO = Application.GetById(invoiceItemModel.OperationResult, new object[] { invoiceId });
                if (invoiceDTO != null)
                {
                    invoiceItemModel.Invoice = new InvoiceViewModel(invoiceDTO);
                }
            }
            catch (Exception exception)
            {
                invoiceItemModel.OperationResult.ParseException(exception);
            }

            return(PartialView(invoiceItemModel));
        }
Ejemplo n.º 2
0
        public ActionResult Delete(InvoiceItemModel invoiceItemModel)
        {
            try
            {
                if (Application.Delete(invoiceItemModel.OperationResult, (InvoiceDTO)invoiceItemModel.Invoice.ToDTO()))
                {
                    return(JsonResultSuccess(new { uri = ReadUrlDictionary() }));
                }
            }
            catch (Exception exception)
            {
                invoiceItemModel.OperationResult.ParseException(exception);
            }

            return(JsonResultOperationResult(invoiceItemModel.OperationResult));
        }
Ejemplo n.º 3
0
        public ActionResult Delete(InvoiceItemModel invoiceItemModel)
        {
            try
            {
                if (Application.Delete(invoiceItemModel.OperationResult, (InvoiceDTO)invoiceItemModel.Invoice.ToDTO()))
                {
                    return(RedirectToUrlDictionary());
                }
            }
            catch (Exception exception)
            {
                invoiceItemModel.OperationResult.ParseException(exception);
            }

            invoiceItemModel.IsSecurityOperations = IsSecurityOperations;

            return(View(invoiceItemModel));
        }
Ejemplo n.º 4
0
        public ActionResult Create(int?masterCustomerId = null)
        {
            InvoiceItemModel invoiceItemModel = new InvoiceItemModel()
            {
                IsSecurityOperations = this.IsSecurityOperations,
                Invoice          = new InvoiceViewModel(),
                ControllerAction = "Create",
                MasterCustomerId = masterCustomerId
            };

            try
            {
                IsCreate(invoiceItemModel.OperationResult);
            }
            catch (Exception exception)
            {
                invoiceItemModel.OperationResult.ParseException(exception);
            }

            return(PartialView(invoiceItemModel));
        }