public ActionResult MobileRegister() { MobileModels MobileModel = new MobileModels(); var brand = MobileModel.GetBrand(); ViewBag.brand = brand; MobileViewModel MobileVM = new MobileViewModel(); return(View(MobileVM)); }
public ActionResult MobileRegister(MobileViewModel MobileView) { MobileModels MobileModel = new MobileModels(); var AMobile = MobileModel.ConvertMobileViewToMobile(MobileView); MobileModel.InsertMobile(AMobile); var brand = MobileModel.GetBrand(); ViewBag.brand = brand; DateTimeConvert DateModel = new DateTimeConvert(); var dateText = DateModel.ConvertDateTimeToString(MobileView.ProductionDate); MobileView.DateText = dateText; return(View(MobileView)); }