public virtual void Create() { string name = ctx.Post( "Name" ); if (strUtil.IsNullOrEmpty( name )) { echoError( "请填写名称" ); return; } FileCategory cat = new FileCategory(); cat.Name = name; cat.IsThumbView = ctx.PostIsCheck( "IsThumbView" ); cat.insert(); echoToParentPart( lang( "opok" ) ); }
public void Create() { string name = ctx.Post( "Name" ); if (strUtil.IsNullOrEmpty( name )) { errors.Add( "�������" ); run( Add ); return; } FileCategory cat = new FileCategory(); cat.Name = name; cat.IsThumbView = ctx.PostIsCheck( "IsThumbView" ); cat.insert(); echoRedirect( lang( "opok" ), List ); }