예제 #1
0
        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" ) );
        }
예제 #2
0
        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 );
        }