public ActionResult Add(OrganizeModel model) { model.CreateTime = DateTime.Now; model.CreateUserId = Operator.UserId; model.UpdateTime = DateTime.Now; model.UpdateUserId = Operator.UserId; var result = OrganizeService.Insert(model) ? SuccessTip("添加成功") : ErrorTip("添加失败"); return(Json(result)); }
public ActionResult Form(Sys_Organize model) { if (model.Id == 0) { var primaryKey = OrganizeService.Insert(model); return(primaryKey > 0 ? Success() : Error()); } else { int row = OrganizeService.Update(model); return(row > 0 ? Success() : Error()); } }