public virtual void Update(long id) { string name = ctx.Post("Name"); if (strUtil.IsNullOrEmpty(name)) { echoError("请填写名称"); return; } LicenseType lt = LicenseType.GetById(id); lt.Name = name; lt.update(); echoToParentPart(lang("opok")); }
public void Update(int id) { string name = ctx.Post("Name"); if (strUtil.IsNullOrEmpty(name)) { errors.Add("请填写名称"); run(Edit, id); return; } LicenseType lt = LicenseType.GetById(id); lt.Name = name; lt.update(); echoRedirect(lang("opok"), List); }