예제 #1
0
        public virtual void Create()
        {
            string name = ctx.Post("Name");

            if (strUtil.IsNullOrEmpty(name))
            {
                echoError("请填写名称");
                return;
            }

            FileLang pf = new FileLang();

            pf.Name = name;
            pf.insert();

            echoToParentPart(lang("opok"));
        }
예제 #2
0
        public void Create()
        {
            string name = ctx.Post("Name");

            if (strUtil.IsNullOrEmpty(name))
            {
                errors.Add("请填写名称");
                run(Add);
                return;
            }

            FileLang pf = new FileLang();

            pf.Name = name;
            pf.insert();

            echoRedirect(lang("opok"), List);
        }