Esempio n. 1
0
        public JsonResult List()
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.QueryPapers(null, null);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 2
0
        public JsonResult Delete(string pkid)
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.DeletePaperRule(pkid);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 3
0
        public JsonResult Add(sysrole role)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(role);

            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um    = SessionUser;
                DateTime  dtnow = DateTime.Now;
                role.createdate = dtnow;
                role.creater    = um.UserNo;
                role.editdate   = dtnow;
                role.editer     = um.UserNo;

                Permission permission = new Permission();
                orm      = permission.InsertRole(role);
                orm.rows = role;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 4
0
        public JsonResult Delete(string serialno)
        {
            CommonBll          commbll = new CommonBll();
            OperateResultModel orm     = commbll.DeleteSerialSet(serialno);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 5
0
        public JsonResult Query()
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.QueryPaperRules();

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 6
0
        public JsonResult Add(tbl_chexing model)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(model);

            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um    = SessionUser;
                DateTime  dtnow = DateTime.Now;
                model.createdate = dtnow;
                model.creater    = um.UserNo;
                model.editdate   = dtnow;
                model.editer     = um.UserNo;

                CommonBll common = new CommonBll();
                orm      = common.InsertCheXing(model);
                orm.rows = model;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 7
0
        public JsonResult Index(string serialno, string serialname)
        {
            CommonBll          commbll = new CommonBll();
            OperateResultModel orm     = commbll.QuerySerialSetes(serialno, serialname);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 8
0
        public JsonResult Index(string areano, string areaname)
        {
            CommonBll          commbll = new CommonBll();
            OperateResultModel orm     = commbll.QueryAreaInfos(areano, areaname);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 9
0
        public JsonResult Delete(string areano)
        {
            CommonBll          commbll = new CommonBll();
            OperateResultModel orm     = commbll.DeleteAreaInfo(areano);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 10
0
        public JsonResult Add(tbl_section section)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(section);

            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um    = SessionUser;
                DateTime  dtnow = DateTime.Now;
                section.createdate = dtnow;
                section.creater    = um.UserNo;
                section.editdate   = dtnow;
                section.editer     = um.UserNo;

                Bank bank = new Bank();
                orm      = bank.InsertSection(section);
                orm.rows = section;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 11
0
        public JsonResult Delete(string sid)
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.DeleteSection(sid);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 12
0
        public JsonResult Add(sysuser user)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(user);

            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um = SessionUser;
                user.password = "******";
                DateTime dtnow = DateTime.Now;
                user.createdate = dtnow;
                user.creater    = um.UserNo;
                user.editdate   = dtnow;
                user.editer     = um.UserNo;

                Permission permission = new Permission();
                orm      = permission.InsertUser(user);
                orm.rows = user;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 13
0
        public JsonResult Password(string userno, string repeatpassword, string newpassword)
        {
            OperateResultModel orm = new OperateResultModel();

            try
            {
                if (string.IsNullOrEmpty(repeatpassword) || string.IsNullOrEmpty(newpassword))
                {
                    throw new Exception("密码不能为空");
                }

                if (repeatpassword != newpassword)
                {
                    throw new Exception("两次密码输入不一致");
                }

                Permission permission = new Permission();
                sysuser    user       = new sysuser()
                {
                    userno   = userno,
                    password = newpassword,
                    editer   = SessionUser.UserNo,
                    editdate = DateTime.Now
                };
                orm = permission.UpdateUser(user);
            }
            catch (Exception ex)
            {
                orm.message = ex.Message;
                orm.success = false;
            }

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 14
0
        public JsonResult BankInfo()
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.QueryBanks(null, null, null, null, true, null, null);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 15
0
        public JsonResult Delete(string chexing)
        {
            CommonBll          common = new CommonBll();
            OperateResultModel orm    = common.DeleteCheXing(chexing);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 16
0
        public JsonResult Index(string jiaxname, string areano)
        {
            JiaxInfo           jiaxinfo = new JiaxInfo();
            OperateResultModel orm      = jiaxinfo.QueryJiaxes(jiaxname, areano);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 17
0
        public JsonResult Query()
        {
            CommonBll          common = new CommonBll();
            OperateResultModel orm    = common.QueryCheXings();

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 18
0
        public JsonResult Delete(string jiaxid)
        {
            JiaxInfo           jiaxinfo = new JiaxInfo();
            OperateResultModel orm      = jiaxinfo.DeleteJiax(jiaxid);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 19
0
        public JsonResult Delete(string xueyh)
        {
            JiaxInfo           jiaxinfo = new JiaxInfo();
            OperateResultModel orm      = jiaxinfo.DeleteXueyuan(xueyh);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 20
0
        /// <summary>
        /// 保存练习或考试记录
        /// </summary>
        /// <param name="model">主表实体</param>
        /// <param name="qid">题目ID</param>
        /// <param name="answer">答案</param>
        /// <returns></returns>
        public JsonResult save(tbl_test_records model, int qid, string answer)
        {
            Study study            = new Study();
            OperateResultModel orm = study.UpdateTestSelect(model, qid, answer);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 21
0
        public JsonResult Update(sysserialset model)
        {
            CommonBll          commbll = new CommonBll();
            OperateResultModel orm     = commbll.UpdateSerialSet(model);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 22
0
        public JsonResult Delete(int id)
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.DeleteBank(id);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 23
0
        public JsonResult QueryUserRoles(string userno)
        {
            Permission         permission = new Permission();
            OperateResultModel orm        = permission.QueryUserRoels(userno);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 24
0
        public JsonResult seterror(int id)
        {
            Bank bank = new Bank();
            OperateResultModel orm = bank.SetErrorType(id, SessionUser.UserNo);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 25
0
        public JsonResult Add(tbl_paper_rule paperrule)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(paperrule);

            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um    = SessionUser;
                DateTime  dtnow = DateTime.Now;
                paperrule.createdate = dtnow;
                paperrule.creater    = um.UserNo;
                paperrule.editdate   = dtnow;
                paperrule.editer     = um.UserNo;
                paperrule.pkid       = NewGuid;

                Bank bank = new Bank();
                orm      = bank.InsertPaperRule(paperrule);
                orm.rows = paperrule;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 26
0
        public JsonResult Query(string title, string qtype, string ynpic, string ynanimal, int page = 1, int rows = 20)
        {
            Bank       bank = new Bank();
            PaginModel pm   = new PaginModel()
            {
                page     = page,
                pagesize = rows
            };

            bool?ispic = null;

            if (!string.IsNullOrEmpty(ynpic))
            {
                ispic = ynpic == "Y";
            }

            bool?isanimal = null;

            if (!string.IsNullOrEmpty(ynanimal))
            {
                isanimal = ynanimal == "Y";
            }

            OperateResultModel orm = bank.QueryBanks(title, qtype, ispic, isanimal, true, null, pm);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 27
0
        public JsonResult Query()
        {
            Permission         permission = new Permission();
            OperateResultModel orm        = permission.QueryRoles();

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 28
0
        public JsonResult Add(tbl_bank bankmodel)
        {
            OperateResultModel orm = new OperateResultModel();

            orm.message = ValidInput(bankmodel);
            if (string.IsNullOrEmpty(orm.message))
            {
                UserModel um    = SessionUser;
                DateTime  dtnow = DateTime.Now;
                bankmodel.createdate = dtnow;
                bankmodel.creater    = um.UserNo;
                bankmodel.editdate   = dtnow;
                bankmodel.editer     = um.UserNo;

                Bank bank = new Bank();
                bankmodel.id = bank.GetNewBankId();
                orm          = bank.InsertBank(bankmodel);
                orm.rows     = bankmodel;
            }
            else
            {
                orm.success = false;
            }
            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 29
0
        public JsonResult Delete(string roleno)
        {
            Permission         permission = new Permission();
            OperateResultModel orm        = permission.DeleteRole(roleno);

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }
Esempio n. 30
0
        public JsonResult Jiax()
        {
            JiaxInfo           jiaxinfo = new JiaxInfo();
            OperateResultModel orm      = jiaxinfo.QueryJiaxes("", "");

            return(JsonResultHelper.ConvertToJsonResult(orm));
        }