public ActionResult Create(long?Id) { var model = new Models.CarTypeModels.CarTypeModel(); if (Id != null) { var cache = new Cache.CarTypeCache().Get(Common.FormsTicket.SystemCode).Where(c => c.Id == Id).FirstOrDefault(); model = new Models.CarTypeModels.CarTypeModel { Id = cache.Id, TypeSort = cache.TypeSort, TypeName = cache.TypeName }; } return(View(model)); }
public ActionResult Save(Models.CarTypeModels.CarTypeModel model) { var group = new UCMS.Entitys.CarType() { Id = model.Id, TypeSort = model.TypeSort, TypeName = model.TypeName, IsDelete = (int)Common.EnumModel.EIsDelete.NotDelete, TimeStamp = DateTime.Now, }; var line = provider.Edit(group); if (line > 0) { //删除缓存 new Cache.CarTypeCache().Delete(Common.FormsTicket.SystemCode); } return(Json(new { d = line > 0 ? 1 : 0 })); }