Пример #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 );
        }