コード例 #1
0
        /// <summary>
        /// 修改状态阅卷状态
        /// </summary>
        private string SetTypeByLszh()
        {
            string lszh = Request.Form["lszh"];

            EDRS.BLL.YX_DZJZ_LSYJSQ          bll       = new EDRS.BLL.YX_DZJZ_LSYJSQ(Request);
            List <EDRS.Model.YX_DZJZ_LSYJSQ> modelList = bll.GetModelList(" and LSZH=:LSZH", new object[] { lszh });

            if (modelList != null && modelList.Count > 0)
            {
                if (modelList[0].SQDZT == "X")
                {
                    modelList[0].SQDZT = "D";
                    if (bll.Update(modelList[0]))
                    {
                        return(ReturnString.JsonToString(Prompt.win, "Y", null));
                    }
                }
            }
            return(ReturnString.JsonToString(Prompt.error, "N", null));
        }
コード例 #2
0
ファイル: CallService.asmx.cs プロジェクト: wkfff/DZJZ-FY-
        public object[] SetYjKh(string kh, string yjxh)
        {
            if (string.IsNullOrEmpty(kh) || string.IsNullOrEmpty(yjxh))
            {
                return(new object[] { false, "卡号和阅卷序号不能为空" });
            }
            EDRS.BLL.YX_DZJZ_LSAJBD bll = new EDRS.BLL.YX_DZJZ_LSAJBD(HttpContext.Current.Request);
            try
            {
                DataSet ds = bll.GetYZYJZH(" and JDBMMC=:JDBMMC", new object[] { kh });

                if (ds != null && ds.Tables.Count > 0)
                {
                    if (ds.Tables[0].Rows.Count > 0)
                    {
                        DataRow[] dr = ds.Tables[0].Select("SQDZT='X'");
                        if (dr.Length > 0)
                        {
                            return new object[] { false, "该卡正在使用" }
                        }
                        ;
                    }
                    EDRS.Model.YX_DZJZ_LSAJBD model = bll.GetModel(yjxh);
                    if (model != null)
                    {
                        model.JDBMMC = kh;
                        try
                        {
                            if (bll.Update(model))
                            {
                                EDRS.BLL.YX_DZJZ_LSYJSQ          bllsq = new EDRS.BLL.YX_DZJZ_LSYJSQ(HttpContext.Current.Request);
                                List <EDRS.Model.YX_DZJZ_LSYJSQ> list  = bllsq.GetModelList(" and LSZH=:LSZH", new object[] { model.GH });
                                if (list != null && list.Count > 0)
                                {
                                    list[0].SQDZT = "X";
                                    if (bllsq.Update(list[0]))
                                    {
                                        return new object[] { true, "写卡成功" }
                                    }
                                    ;
                                    else
                                    {
                                        model.JDBMMC = "";

                                        bll.Update(model);
                                    }
                                }
                            }
                        }
                        catch (Exception ex)
                        {
                            return(new object[] { false, ex.Message });
                        }
                        return(new object[] { false, "写卡失败" });
                    }
                    return(new object[] { false, "阅卷信息不存在" });
                }
            }
            catch (Exception ex)
            {
                return(new object[] { false, ex.Message });
            }
            return(new object[] { false, "验证卡号失败" });
        }