public async Task <IActionResult> MobilePhoneType([FromForm] MDOtherItemViewModel model) { string attachPath = string.Empty; if (model.img != null) { string fileName; string message = FileSave.SaveImage(out fileName, "Upload/Attachment/MDOtherItem", model.img); if (message == "success") { attachPath = fileName; } } MobilePhoneType type = new MobilePhoneType { Id = (int)model.id, typeName = model.typeName, typeNameBn = model.typeNameBn, shortOrder = model.shortOrder, imagePath = attachPath }; await electronicService.SaveMobilePhoneType(type); return(RedirectToAction(nameof(MobilePhoneType))); }
public async Task <IActionResult> FileDocumentType() { MDOtherItemViewModel model = new MDOtherItemViewModel { fileDocumentTypes = await electronicService.GetAllFileDocumentType(), }; return(View(model)); }
public async Task <IActionResult> ElectronicsType() { MDOtherItemViewModel model = new MDOtherItemViewModel { electronicsTypes = await electronicService.GetAllElectronicsType() }; return(View(model)); }
public async Task <IActionResult> MobilePhoneType() { MDOtherItemViewModel model = new MDOtherItemViewModel { mobilePhoneTypes = await electronicService.GetAllMobilePhoneType(), }; return(View(model)); }
public async Task <IActionResult> OtherBrandelUmbrella() { string brandFor = "umbrella"; MDOtherItemViewModel model = new MDOtherItemViewModel { otherBrands = await electronicService.GetAllOtherBrand(brandFor), }; return(View(model)); }
public async Task <IActionResult> FileDocumentType([FromForm] MDOtherItemViewModel model) { FileDocumentType type = new FileDocumentType { Id = (int)model.id, typeName = model.typeName, typeNameBn = model.typeNameBn, shortOrder = model.shortOrder }; await electronicService.SaveFileDocumentType(type); return(RedirectToAction(nameof(FileDocumentType))); }
public async Task <IActionResult> OtherBrand([FromForm] MDOtherItemViewModel model) { string attachPath = string.Empty; if (model.img != null) { string fileName; string message = FileSave.SaveImage(out fileName, "Upload/Attachment/MDOtherItem", model.img); if (message == "success") { attachPath = fileName; } } OtherBrand type = new OtherBrand { Id = (int)model.id, brandName = model.typeName, brandNameBn = model.typeNameBn, brandFor = model.brandFor, shortOrder = model.shortOrder, imagePath = attachPath }; await electronicService.SaveOtherBrand(type); if (model.brandFor == "mobile") { return(RedirectToAction(nameof(OtherBrandMobile))); } else if (model.brandFor == "watch") { return(RedirectToAction(nameof(OtherBrandWatch))); } else if (model.brandFor == "shoes") { return(RedirectToAction(nameof(OtherBrandShoes))); } else if (model.brandFor == "bag") { return(RedirectToAction(nameof(OtherBrandBag))); } else if (model.brandFor == "electronics") { return(RedirectToAction(nameof(OtherBrandelEctronics))); } else if (model.brandFor == "jwellary") { return(RedirectToAction(nameof(OtherBrandelJwellary))); } else if (model.brandFor == "glass") { return(RedirectToAction(nameof(OtherBrandelGlass))); } else if (model.brandFor == "umbrella") { return(RedirectToAction(nameof(OtherBrandelUmbrella))); } else { return(RedirectToAction(nameof(OtherBrandMobile))); } }