public async Task <ActionResult> Create() { var model = new CreateCreditMemoViewModel { Invoices = (await _invoiceAppService.GetInvoice()).Items, Customers = (await _customerService.GetCustomer()).Items, Products = (await _productService.GetProduct()).Items, LoginInformations = await _sessionAppService.GetCurrentLoginInformations(), LocationSites = (await _locationSiteAppService.GetLocationSite()).Items }; return(View("Create", model)); }
public async Task <PartialViewResult> CreateOrUpdateTeamMembersModal(long?id = null) { int? impersonatorTenantId; int value; string str; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; value = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; value = impersonatorTenantId.Value; } int num = value; IInvoiceAppService invoiceAppService = this._invoiceAppService; NullableIdInput <long> nullableIdInput = new NullableIdInput <long>() { Id = id }; CreateOrUpdateInvoiceTeamMembersModalViewModel createOrUpdateInvoiceTeamMembersModalViewModel = new CreateOrUpdateInvoiceTeamMembersModalViewModel(await invoiceAppService.GetInvoiceTeamMembersForEdit(nullableIdInput)); CreateOrUpdateInvoiceTeamMembersModalViewModel createOrUpdateInvoiceTeamMembersModalViewModel1 = createOrUpdateInvoiceTeamMembersModalViewModel; long value1 = id.Value; createOrUpdateInvoiceTeamMembersModalViewModel1.InvoiceId = long.Parse(value1.ToString()); List <SelectListItem> selectListItems = new List <SelectListItem>(); ListResultDto <UserListDto> teamMembersByTenantId = await this._invoiceAppService.GetTeamMembersByTenantId(num, true); if (!teamMembersByTenantId.Items.Any <UserListDto>()) { this.ViewData["TeamMembers"] = null; } else { foreach (UserListDto item in teamMembersByTenantId.Items) { string name = item.Name; str = (item.Name.Length > 0 || item.Surname.Length > 0 ? " " : ""); string str1 = string.Concat(name, str, item.Surname); List <SelectListItem> selectListItems1 = selectListItems; SelectListItem selectListItem = new SelectListItem() { Text = str1, Value = item.Id.ToString(), Selected = false }; selectListItems1.Add(selectListItem); } this.ViewData["TeamMembers"] = selectListItems.AsEnumerable <SelectListItem>(); } IInvoiceAppService invoiceAppService1 = this._invoiceAppService; value1 = id.Value; Invoice invoice = await invoiceAppService1.GetInvoice(long.Parse(value1.ToString())); ((dynamic)this.ViewBag).InvoiceName = invoice.Label; return(this.PartialView("_CreateOrUpdateTeamMembersModal", createOrUpdateInvoiceTeamMembersModalViewModel)); }
public async Task <ActionResult> Index() { var invoices = (await _invoiceAppService.GetInvoice()).Items; var model = new InvoiceListViewModel { InvoiceHeaders = invoices }; return(View(model)); }
public async Task <PartialViewResult> CreateOrViewPaymentModal(long invoiceId, long?id = null, bool c = false) { int?impersonatorTenantId; int value; if (this.AbpSession.ImpersonatorTenantId.HasValue) { impersonatorTenantId = this.AbpSession.ImpersonatorTenantId; value = impersonatorTenantId.Value; } else { impersonatorTenantId = this.AbpSession.TenantId; value = impersonatorTenantId.Value; } IInvoiceAppService invoiceAppService = this._invoiceAppService; NullableIdInput <long> nullableIdInput = new NullableIdInput <long>() { Id = id }; CreateOrViewPaymentModalViewModel createOrViewPaymentModalViewModel = new CreateOrViewPaymentModalViewModel(await invoiceAppService.GetInvoicePaymentForCreateOrView(nullableIdInput)); if (createOrViewPaymentModalViewModel.InvoicePayment.InvoiceId <= (long)0) { createOrViewPaymentModalViewModel.InvoicePayment.InvoiceId = invoiceId; } IInvoiceAppService invoiceAppService1 = this._invoiceAppService; long num = createOrViewPaymentModalViewModel.InvoicePayment.InvoiceId; Invoice invoice = await invoiceAppService1.GetInvoice(long.Parse(num.ToString())); Invoice invoice1 = invoice; createOrViewPaymentModalViewModel.InvoicePayment.Invoice = invoice1; Customer customerById = await this._customerAppServer.GetCustomerById(invoice1.CustomerId); createOrViewPaymentModalViewModel.InvoicePayment.Customer = customerById.MapTo <Customer>(); if (c) { ((dynamic)this.ViewBag).IsCustomer = true; } return(this.PartialView("_CreateOrViewPaymentModal", createOrViewPaymentModalViewModel)); }