Beispiel #1
0
 public string GetOpenInvoicesForMobile(CustomerInvoice CusObj)
 {
     try
     {
         CustomerInvoicesSummaryForMobileViewModel invoiceObj = Mapper.Map <CustomerInvoicesSummaryForMobile, CustomerInvoicesSummaryForMobileViewModel>(_customerInvoicesBusiness.GetOpeningCustomerInvoices(CusObj));
         return(JsonConvert.SerializeObject(new { Result = true, Records = new { OpeningList = invoiceObj.CustInv, Summary = invoiceObj.CustInvSumObj } }));
     }
     catch (Exception ex)
     {
         return(JsonConvert.SerializeObject(new { Result = false, Message = ex.Message }));
     }
 }
Beispiel #2
0
        public string GetCustomerInvoicesByDateWiseForMobile(CustomerInvoice CusmObj)
        {
            try
            {
                if (CusmObj == null)
                {
                    throw new Exception(messages.NoItems);
                }

                if (CusmObj.FromDate == null && CusmObj.ToDate == null)
                {
                    CusmObj.commonObj = new SPAccounts.DataAccessObject.DTO.Common();
                    CusmObj.FromDate  = CusmObj.commonObj.GetCurrentDateTime().ToString();
                    CusmObj.ToDate    = CusmObj.commonObj.GetCurrentDateTime().ToString();
                }
                CustomerInvoicesSummaryForMobileViewModel invoiceObj = Mapper.Map <CustomerInvoicesSummaryForMobile, CustomerInvoicesSummaryForMobileViewModel>(_customerInvoicesBusiness.GetCustomerInvoicesByDateWise(CusmObj));
                return(JsonConvert.SerializeObject(new { Result = true, Records = new { List = invoiceObj.CustInv, Summary = invoiceObj.CustInvSumObj } }));
            }
            catch (Exception ex)
            {
                return(JsonConvert.SerializeObject(new { Result = false, Message = ex.Message }));
            }
        }