public string getAddressHtml(int addressId, AddressHtmlType addressType, DbWithControllerWithMaster helperController) { string addressHtml = ""; var addressItem = db.tbl_address.Where(a => a.addressId == addressId).FirstOrDefault(); addressHtml = getAddressHtml(addressItem, addressType, helperController); return addressHtml; }
public string getAddressHtml(tbl_address addressItem, AddressHtmlType addressType, DbWithControllerWithMaster helperController) { if (addressItem != null) { switch (addressType) { case AddressHtmlType.agreement: var item = getAddressAccountTemplate(addressItem); return item.content; case AddressHtmlType.mail: case AddressHtmlType.orderDetail: return helperController.RenderRazorViewToString("AddressMailHtml", addressItem); case AddressHtmlType.adminOrderDetail: return ""; } } return ""; }
private string getBasketListWithPlainHtml(orderSummary helperPage, DbWithControllerWithMaster helperController, BasketHtmlType htmlType) { switch (htmlType) { case BasketHtmlType.agreement: return helperController.RenderRazorViewToString("PlainBasket", helperPage); case BasketHtmlType.mail: return helperController.RenderRazorViewToString("PlainBasketMail", helperPage); default: return ""; } }
internal orderInfo getOrderInfoByCheckoutProcess(checkoutProcess checkoutItem, orderSummary helperPage, DbWithControllerWithMaster helperController, BasketHtmlType htmlType, AddressHtmlType addressType, TransferHtmlType transferType, int langId) { var ads = new addressShared(db); var us = new userShared(db); var item = new ViewModel.Checkout.Summary.orderInfo(); // Kayıtlı Üye if (checkoutItem.cartItem.isRegisteredUser) { //customerNameSurname item.customerNameSurname = checkoutItem.cartItem.nameSurname; //customerEmail var userId = checkoutItem.cartItem.userId; item.customerEmail = us.getUserById(userId).email; //customer Delivery Adress item.deliveryHtml = ads.getAddressHtml(checkoutItem.deliveryAddressId, addressType, helperController); //customerPhone item.customerPhone = ads.getAddresPhoneByAddressId(checkoutItem.deliveryAddressId); // customer Billing Addres item.billingHtml = ads.getAddressHtml(checkoutItem.billingAddressId, addressType, helperController); } else { //customerNameSurname item.customerNameSurname = checkoutItem.trackInfo.name + " " + checkoutItem.trackInfo.surname; //customerEmail item.customerEmail = checkoutItem.trackInfo.email; //customer Delivery Adress item.deliveryHtml = ads.getAddressHtml(checkoutItem.deliveryAddress, addressType, helperController); //customerPhone item.customerPhone = checkoutItem.deliveryAddress.phone; // customer Billing Addres item.billingHtml = ads.getAddressHtml(checkoutItem.billingAddress, addressType, helperController); } item.orderDate = DateTime.Now.ToString("dd.MM.yyyy"); item.customerBasket = getBasketListWithPlainHtml(helperPage, helperController, htmlType); item.transferAccountHtml = getTransferInfoHtml(checkoutItem.transferInfo.selectedTransferId, langId, helperController, transferType); return item; }
public string getTransferInfoHtml(int eftId, int langId, DbWithControllerWithMaster helperController, TransferHtmlType transferType) { var eftItem = getEftList(langId).Where(a => a.bankEftId == eftId).FirstOrDefault(); if (eftItem != null) { switch (transferType) { case TransferHtmlType.mail: case TransferHtmlType.orderDetail: return helperController.RenderRazorViewToString("TransferMailHtml", eftItem); } } return ""; }