public async Task <PartialViewResult> CreateOrUpdateBankModal(long?ownerId, string ownerType, int tenantId, long?id = null) { long num; IGenericAppService genericAppService = this._genericAppService; NullableIdInput <long> nullableIdInput = new NullableIdInput <long>() { Id = id }; GetBankForEditOutput bankForEdit = await genericAppService.GetBankForEdit(nullableIdInput); if (string.IsNullOrEmpty(bankForEdit.Bank.OwnerType)) { bankForEdit.Bank.OwnerType = ownerType; BankEditDto bank = bankForEdit.Bank; num = (ownerId.HasValue ? ownerId.Value : (long)0); bank.OwnerId = num; } CreateOrUpdateBankModalViewModel createOrUpdateBankModalViewModel = new CreateOrUpdateBankModalViewModel(bankForEdit); List <SelectListItem> selectListItems = new List <SelectListItem>(); foreach (Lookup lookupItem in (new LookupFill("BankTypes", tenantId)).LookupItems) { SelectListItem selectListItem = new SelectListItem() { Text = lookupItem.Text, Value = lookupItem.Value, Disabled = lookupItem.Disabled, Selected = lookupItem.Selected }; selectListItems.Add(selectListItem); } SelectListItem selectListItem1 = new SelectListItem() { Text = "", Value = "", Disabled = false }; selectListItems.Insert(0, selectListItem1); this.ViewData["BankTypes"] = selectListItems; return(this.PartialView("_CreateOrUpdateBankModal", createOrUpdateBankModalViewModel)); }
public CreateOrUpdateBankModalViewModel(GetBankForEditOutput output) { output.MapTo <GetBankForEditOutput, CreateOrUpdateBankModalViewModel>(this); }