예제 #1
0
    protected void cbDjzsxzqhC_SelectedIndexChanged(object sender, EventArgs e)
    {
        string code = cbDjzsxzqhC.SelectedValue;

        cbDjzsxzqhValue.Items.Clear();
        DrvQueryHelper.BindDDLArea(cbDjzsxzqhValue, code);
    }
예제 #2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        string lStrIDCard = "";

        if (Request.Params[FPSystemBiz.PARAM_RESULT] == null)
        {
            return;
        }
        lStrIDCard = Request.Params[FPSystemBiz.PARAM_RESULT].ToString();
        if (lStrIDCard.Length < 1)
        {
            this.lbAlertMsg.Text = "没有该学员的指纹信息";
            return;
        }
        //int lIntResultCode = FPSystemBiz.fnIdendityStudentLesson(lStrIDCard);
        //lStrIDCard = "'" + lStrIDCard + "'";
        //FpStudentObject fso = SimpleOrmOperator.Query<FpStudentObject>(lStrIDCard);
        TempStudentInfo tempStudentInfo = DrvQueryHelper.QueryStudent(lStrIDCard);
        FpStudentObject fso             = new FpStudentObject();

        if (tempStudentInfo == null && 1 == 2)
        {
            this.lbAlertMsg.Visible = true;
            this.lbAlertMsg.Text    = "没有该学员的个人信息";
            return;
        }
        fso.fromTempStudentInfo(tempStudentInfo);
        Session[SESSION_STUDENT] = fso;
        this.fnUILoadStudentRecord(fso, tempStudentInfo);
    }
예제 #3
0
    protected void ddlCity_SelectedIndexChanged(object sender, EventArgs e)
    {
        string code = this.ddlCity.SelectedValue;

        if (code.Length > 0)
        {
            DrvQueryHelper.BindDDLArea(this.ddlArea, code);
        }
    }
예제 #4
0
    protected void ddlProvince_SelectedIndexChanged(object sender, EventArgs e)
    {
        string code = this.ddlProvince.SelectedValue;

        if (code.Length > 0)
        {
            DrvQueryHelper.BindDDLCity(this.ddlCity, code);
        }
    }
예제 #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DrvQueryHelper.BindDDLProvince(this.ddlProvince);
         this.ddlProvince_SelectedIndexChanged(null, null);
         this.ddlCity_SelectedIndexChanged(null, null);
     }
 }
예제 #6
0
 public void fnUILoadStudentRecord(string idcard)
 {
     idcard = StringHelper.fnFormatNullOrBlankString(idcard, "");
     if (idcard != "")
     {
         TempStudentInfo tempStudentInfo = DrvQueryHelper.QueryStudent(idcard);
         FpStudentObject fso             = SimpleOrmOperator.Query <FpStudentObject>(idcard);
         fnUILoadStudentRecord(fso, tempStudentInfo);
     }
 }
예제 #7
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         DrvQueryHelper.BindDropDownListBustype(this.cbBustype);
         string startDate = DateTime.Now.ToString("yyyy-MM-dd");
         string endDate   = DateTime.Now.AddDays(1).ToString("yyyy-MM-dd");
         this.txtBeginDate.Value = startDate;
         this.txtEndDate.Value   = endDate;
         cbBustype.Items.Insert(0, new ListItem("全部", "@"));
         // this.cbBustype.DataTextField = "全部";
         // this.cbBustype.DataValueField = "@";
         BindData(startDate, endDate);
     }
 }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            DrvQueryHelper.BindDropDownListBustype(this.cbBustype);
            DrvQueryHelper.BindDropDownListSfzmmc(this.cbSfzmmcValue);
            DrvQueryHelper.BindDropDownListHospital(this.cbTjyy);
            ListItemCollection tjyys = new ListItemCollection();
            lbJxmc.Text = this.Operator.Desp4;
            foreach (ListItem li in this.cbTjyy.Items)
            {
                if (li.Value.StartsWith(getDefaultCityCode()))
                {
                    tjyys.Add(li);
                }
            }
            this.cbTjyy.Items.Clear();
            foreach (ListItem li in tjyys)
            {
                this.cbTjyy.Items.Add(li);
            }

            DrvQueryHelper.BindDropDownListLocalArea2(this.cbLxzsxzqhValue);
            ListItemCollection xzqhs = new ListItemCollection();
            foreach (ListItem li in this.cbLxzsxzqhValue.Items)
            {
                if (li.Value.StartsWith(getDefaultCityCode()) && li.Value != getDefaultCityCode() + "00")
                {
                    xzqhs.Add(li);
                }
            }
            this.cbXzqhValue.Items.Clear();
            this.cbLxzsxzqhValue.Items.Clear();
            foreach (ListItem li in xzqhs)
            {
                //this.cbXzqhValue.Items.Add(new ListItem(li.Text,li.Value));
                this.cbLxzsxzqhValue.Items.Add(new ListItem(li.Text, li.Value));
                this.cbXzqhValue.Items.Add(new ListItem(li.Text, li.Value));
            }
            this.cbXzqhValue.Items.Add(new ListItem("其它(外地)", "440907"));

            DrvQueryHelper.BindDropDownListLy(this.cbLyValue);
            DrvQueryHelper.BindDropDownListZkcx(this.cbZkcxValue);
            DrvQueryHelper.BindDropDownListNational(this.cbGjValue);
            DrvQueryHelper.BindDropDownListLocalArea(this.cbDjzsxzqhValue);
            //DrvQueryHelper.BindDropDownListLocalArea(this.cbLxzsxzqhValue);
            DrvQueryHelper.BindDDLProvince(this.cbLxzsxzqhP);
            DrvQueryHelper.BindDDLProvince(this.cbDjzsxzqhP);
            this.cbGjValue.SelectedValue = "156";

            if (Request.Params["id"] != null)
            {
                StudentApplyInfo entity = SimpleOrmOperator.Query <StudentApplyInfo>(Convert.ToInt32(Request.Params["id"]));
                WebFormHelper.SetDataToForm(this, entity);
                this.txtTjrq.Value = entity.Tjrq;
                this.txtCsrq.Value = entity.Csrq;
                this.cbDjzsxzqhValue.Items.Clear();
                //this.cbDjzsxzqhValue.Items.Add(new ListItem(entity.Djzsxzqh, entity.Djzsxzqh));
                //this.cbDjzsxzqhValue.Items.Clear();
                //this.cbDjzsxzqhValue.Text = entity.Djzsxzqh;
                this.imgPhoto.ImageUrl       = "ApplyInfoPhoto.aspx?idcard=" + entity.Sfzmhm;
                this.cbBustype.SelectedValue = entity.PhotoSrc;
                if (!string.IsNullOrEmpty(entity.Lxzsxzqh))
                {
                    this.cbLxzsxzqhP.SelectedValue = string.Format("{0}0000", entity.Lxzsxzqh.Substring(0, 2));
                    DrvQueryHelper.BindDDLCity(cbLxzsxzqhC, this.cbLxzsxzqhP.SelectedValue);
                    this.cbLxzsxzqhC.SelectedValue = string.Format("{0}00", entity.Lxzsxzqh.Substring(0, 4));
                    DrvQueryHelper.BindDDLArea(cbLxzsxzqhValue, this.cbLxzsxzqhC.SelectedValue);
                    this.cbLxzsxzqhValue.SelectedValue = entity.Lxzsxzqh;
                }
                if (!string.IsNullOrEmpty(entity.Djzsxzqh))
                {
                    this.cbDjzsxzqhP.SelectedValue = string.Format("{0}0000", entity.Djzsxzqh.Substring(0, 2));
                    DrvQueryHelper.BindDDLCity(cbDjzsxzqhC, this.cbDjzsxzqhP.SelectedValue);
                    this.cbDjzsxzqhC.SelectedValue = string.Format("{0}00", entity.Djzsxzqh.Substring(0, 4));
                    DrvQueryHelper.BindDDLArea(cbDjzsxzqhValue, this.cbDjzsxzqhC.SelectedValue);
                    this.cbDjzsxzqhValue.SelectedValue = entity.Djzsxzqh;
                }
            }
            else
            {
                this.imgPhoto.ImageUrl = "~/images/no_photo.jpg";
                //this.cbLxzsxzqhValue.SelectedValue = "440500";
                //this.cbXzqhValue.SelectedValue = "440500";
                //this.cbDjzsxzqhValue.SelectedValue = "440500";

                this.cbLxzsxzqhP.SelectedValue = string.Format("{0}0000", this.getDefaultCityCode().Substring(0, 2));
                DrvQueryHelper.BindDDLCity(cbLxzsxzqhC, this.cbLxzsxzqhP.SelectedValue);
                this.cbLxzsxzqhC.SelectedValue = string.Format("{0}00", this.getDefaultCityCode());
                DrvQueryHelper.BindDDLArea(cbLxzsxzqhValue, this.cbLxzsxzqhC.SelectedValue);

                this.cbDjzsxzqhP.SelectedValue = string.Format("{0}0000", this.getDefaultCityCode().Substring(0, 2));
                DrvQueryHelper.BindDDLCity(cbDjzsxzqhC, this.cbDjzsxzqhP.SelectedValue);
                this.cbDjzsxzqhC.SelectedValue = string.Format("{0}00", this.getDefaultCityCode().Substring(0, 4));
                DrvQueryHelper.BindDDLArea(cbDjzsxzqhValue, this.cbDjzsxzqhC.SelectedValue);

                this.txtYsl.Text = "5.0";
                this.txtZsl.Text = "5.0";
                this.cbZkcxValue.SelectedValue = "C1";
                this.txtLxzsyzbm.Text          = "510000";
            }

            if (Request.Params["allowcheck"] == null)
            {
                this.btnCheck.Visible      = false;
                this.btnCheckImage.Visible = false;
            }
            else
            {
                this.btnSure.Visible   = false;
                this.cbBustype.Enabled = false;
            }
        }
    }
예제 #9
0
    public static void Check(int id, string name)
    {
        try
        {
            // throw new Exception("测试异常");
            YuyueInfo info   = SimpleOrmOperator.Query <YuyueInfo>(id);
            string    glbm   = System.Configuration.ConfigurationManager.AppSettings["DrvHelperSystem_glbm"];
            int       bkjg   = int.Parse(ConfigurationManager.AppSettings["DrvHelperSystem_bkjg"].ToString());
            string    idcard = info.IdCard;
            DateTime  yyrq   = Convert.ToDateTime(info.Ksrq);
            int       km     = info.Km;

            /*
             * TempStudentInfo student = DrvQueryHelper.QueryStudent(glbm, info.IdCard);
             * if (student == null)
             * {
             *  SaveInfoCheckFail(info, name, "该学员不是本地车管所报名的!");
             *  return;
             * }
             * info.Dlr = student.jxmc;
             * info.DlrCode = student.jxdm;
             * info.JlyIdCard = student.jly;
             * info.Km = km;
             * info.Lsh = student.lsh;
             * info.Xm = student.name;
             * info.Zjcx = student.zkcx;
             * /*
             * try
             * {
             *  if (DateTime.Parse(student.yxqz).CompareTo(yyrq) < 0)
             *  {
             *      SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "的准考证明有效期到" + student.yxqz + "截止!");
             *      return;
             *
             *  }
             * }
             * catch (System.Exception e)
             * {
             *
             * }
             *
             *
             * if (student.jxdm != null && student.jxdm != info.DlrCode)
             * {
             *  SaveInfoCheckFail(info, name, "驾校学员只能通过相关驾校帮您预约!");
             *  return;
             *
             * }
             * */


            //ArrayList daylimits = SimpleOrmOperator.QueryConditionList<YuyueDayLimit>(" where c_cartype like '%" + student.zkcx + "%' and i_km=" + km);
            ArrayList     daylimits = SimpleOrmOperator.QueryConditionList <YuyueDayLimit>(" where c_cartype like '%" + "C1" + "%' and i_km=" + km);
            TempKscjInfo  kscj      = DrvQueryHelper.QueryKscj(glbm, idcard);
            YuyueDayLimit daylimit  = null;
            if (daylimits != null && daylimits.Count > 0)
            {
                daylimit = daylimits[0] as YuyueDayLimit;
            }
            if (kscj != null)
            {
                if (km == 1)
                {
                    if (kscj.km1 == 1)
                    {
                        SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "的科目一已经合格!");
                        return;
                    }
                }
                else if (km == 2)
                {
                    if (kscj.km2yyrq != null)
                    {
                        if (kscj.km2 == 1)
                        {
                            SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "的科目二已经合格!");
                            return;
                        }
                        if (kscj.km2 == 2)
                        {
                            if (yyrq.CompareTo(DateTime.Parse(kscj.km2yyrq).AddDays(bkjg)) < 0)
                            {
                                SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "上次考试时间为:" + kscj.km2yyrq + ",科目二补考必须在上一次考试" + bkjg + "天之后!");
                                return;
                            }
                        }
                    }
                    else if (kscj.km1 == 1 && daylimit != null)
                    {
                        if (yyrq.CompareTo(DateTime.Parse(kscj.km1yyrq).AddDays(daylimit.Days)) < 0)
                        {
                            SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "科目一考试时间为:" + kscj.km1yyrq + ",申请" + daylimit.CarType + "牌照的科目二考试必须在" + daylimit.Days + "天之后!");
                            return;
                        }
                    }
                    else
                    {
                        SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "科目一还没有合格!");
                        return;
                    }
                }

                else if (km == 3)
                {
                    if (kscj.km3yyrq != null)
                    {
                        if (kscj.km3 == 1)
                        {
                            SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "的科目三已经合格!");
                            return;
                        }
                        if (kscj.km3 == 2)
                        {
                            if (yyrq.CompareTo(DateTime.Parse(kscj.km3yyrq).AddDays(bkjg)) < 0)
                            {
                                SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "上次考试时间为:" + kscj.km2yyrq + ",科目三补考必须在上一次考试" + bkjg + "天之后!");
                                return;
                            }
                        }
                    }
                    else if (kscj.km2 == 1 && daylimit != null)
                    {
                        if (yyrq.CompareTo(DateTime.Parse(kscj.km1yyrq).AddDays(daylimit.Days)) < 0)
                        {
                            SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "科目一考试时间为:" + kscj.km1yyrq + ",申请" + daylimit.CarType + "牌照的科目三考试必须在" + daylimit.Days + "天之后!");
                            return;
                        }
                    }
                    else
                    {
                        SaveInfoCheckFail(info, name, "身份证明号码" + idcard + "科目二还没有合格!");
                        return;
                    }
                }
            }

            //&& info.Checked == 0
            if (info != null)
            {
                info.CheckOperator = name;
                info.Jbr           = name;
                TmriResponse resp = null;
                try
                {
                    string useold = System.Configuration.ConfigurationManager.AppSettings["Drv_Yuyue_Use_Old"];
                    if (useold == "true")
                    {
                        resp = new TmriResponse();
                        bool resultold = DriverInterface.WritePreasignOld(ConvertInfoToRequest(info));
                        // resultold ? 0 : 2;
                        if (resultold)
                        {
                            resp.Code    = 0;
                            resp.Message = "更新成功";
                        }
                        else
                        {
                            resp.Code    = 2;
                            resp.Message = "更新不成功";
                        }
                    }
                    else
                    {
                        resp = DriverInterface.WriteDrvBaseTmriRequest(ConvertInfoToRequest(info));
                    }
                    //resp= DriverInterface.yuyueInfo(info);
                }
                catch (Exception exe)
                {
                    SaveInfoCheckFail(info, name, exe.Message);
                    //info.CheckResult = exe.Message;
                    // SimpleOrmOperator.Update(info);
                    return;
                }
                if (resp.Code == 0 || resp.Code == 1)
                {
                    info.Checked     = 1;
                    info.CheckResult = resp.Message;
                    SimpleOrmOperator.Update(info);
                    if (!DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_checked_num=i_checked_num+1 where i_checked_num<i_used_num and id=" + info.PaibanId))
                    {
                        DataAccessFactory.GetDataAccess().ExecuteSql("update table_yuyue_limit set i_tpchecked_num=i_tpchecked_num+1 where i_tpchecked_num<i_tpused_num and id=" + info.PaibanId);
                    }
                }
                else
                {
                    SaveInfoCheckFail(info, name, resp.Message);
                    //info.Checked = 2;
                    //info.CheckResult = resp.Message;
                    // SimpleOrmOperator.Update(info);
                }
            }
        }
        catch (Exception ex)
        {
            throw ex;
        }
    }