public virtual void Create() { string name = ctx.Post( "Name" ); if (strUtil.IsNullOrEmpty( name )) { echoError( "请填写名称" ); return; } LicenseType lt = new LicenseType(); lt.Name = name; lt.insert(); echoToParentPart( lang( "opok" ) ); }
public void Create() { string name = ctx.Post( "Name" ); if (strUtil.IsNullOrEmpty( name )) { errors.Add( "请填写名称" ); run( Add ); return; } LicenseType lt = new LicenseType(); lt.Name = name; lt.insert(); echoRedirect( lang( "opok" ), List ); }
public int CompareTo(object obj) { LicenseType t = obj as LicenseType; if (this.OrderId > t.OrderId) { return(-1); } if (this.OrderId < t.OrderId) { return(1); } if (this.Id > t.Id) { return(1); } if (this.Id < t.Id) { return(-1); } return(0); }