Ejemplo n.º 1
0
        public InvoiceResponse GetMonthlyInvoiceReport()
        {
            InvoiceResponse _Result = new InvoiceResponse();

            try
            {
                _Result.DetailData = new List <Invoices>();

                _Result.Status = OperationResult.Success;
            }
            catch (Exception ex)
            {
                _Result.ErrorMessage         = ex.Message;
                _Result.FriendlyErrorMessage = "Error Getting Calculating Tax on Invoices";
                _Result.Status = OperationResult.Exception;
            }
            return(_Result);
        }
Ejemplo n.º 2
0
        public InvoiceResponse GetAllInvoices()
        {
            //Database.SetInitializer(new DropCreateDatabaseIfModelChanges<InvoiceContext>());
            InvoiceResponse _Result = new InvoiceResponse();

            try
            {
                _Result.DataCollection = new List <InvoiceDetail>();
                foreach (InvoiceDetail item in _ctx.InvoiceDetails)
                {
                    _Result.DataCollection.Add(new InvoiceDetail {
                        InvoiceNo = item.InvoiceNo, ClientNumber = item.ClientNumber, InvoiceDate = item.InvoiceDate, InvoiceAmount = item.InvoiceAmount, Type = item.Type
                    });
                }
                _Result.Status = OperationResult.Success;
            }
            catch (Exception ex)
            {
                _Result.ErrorMessage         = ex.Message;
                _Result.FriendlyErrorMessage = "Error Getting All Invoices";
                _Result.Status = OperationResult.Exception;
            }
            return(_Result);
        }