public ActionResult KHQuery(SearchConditionView searchCondition)
        {
            int number = int.Parse(searchCondition.Condition1);
            List<yhxx> yhxxlist = null;
            yhxxlist = baseDAL.Get<yhxx>().Where(c => c.kpbh == number).ToList();

            return Json(yhxxlist);
        }
Esempio n. 2
0
        public ActionResult FindNewUser(SearchConditionView searchCondition)
        {
            List<yhxx> yhxxlist = null;

            if (searchCondition.Condition1 != null )
            {
                yhxxlist = baseDAL.Get<yhxx>().Where(c => c.zz.Contains(searchCondition.Condition1) &&
                    c.zz.Contains(searchCondition.Condition2) && c.zz.Contains(searchCondition.Condition3)).ToList();
            }
            else
            {
                int number = int.Parse(searchCondition.Condition2);
                yhxxlist = baseDAL.Get<yhxx>().Where(c => c.kpbh == number).ToList();
            }

            //ViewBag.yhxxlist = yhxxlist;

            return Json(yhxxlist)  ;
        }
Esempio n. 3
0
        public string VerifyData(SearchConditionView search)
        {
            byte[] key1 = new byte[20];
              byte[] key2 = new byte[20];
              byte[] ver = new byte[30];
              byte[] status = new byte[5];
              int i = 0;
              st = IC.lib_ver(ver);
              st = IC.get_status(icdev, status);
              icdev = IC.ic_init(1, 9600);
              string lbResult;
              string skey = search.Condition1;

              if (skey == null)
              {
                  lbResult = "请正确输入数据!";
                  return lbResult;
              }
              int keylen = skey.Length;
              if (keylen != 6)
              {
                  lbResult = "请正确输入密码,密码长度不对!";
                  return lbResult;
              }

              for (i = 0; i < keylen; i++)
              {
                  if (skey[i] >= '0' && skey[i] <= '9')
                      continue;
                  if (skey[i] <= 'a' && skey[i] <= 'f')
                      continue;
                  if (skey[i] <= 'A' && skey[i] <= 'F')
                      continue;
              }
              if (i != keylen)
              {
                  lbResult = "密码必须为十六进制数!";
                  return lbResult;
              }

              key1 = System.Text.Encoding.ASCII.GetBytes(skey);
              IC.asc_hex(key1, key2, 6);
              st = IC4442.csc_4442(icdev, 3, key2);
              if (st == 0)
                  lbResult = "密码校验成功!";
              else
                  lbResult = "密码校验失败!";
              return lbResult;
        }