コード例 #1
0
        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" ) );
        }
コード例 #2
0
        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 );
        }
コード例 #3
0
        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);
        }