コード例 #1
0
 public ActionResult GetEntity(string keyValue, int type)
 {
     if (type == 0)
     {
         var data = visitcarbll.GetEntity(keyValue);
         return(ToJsonResult(data));
     }
     else if (type == 1)
     {
         OperticketmanagerBLL operbll = new OperticketmanagerBLL();
         var data = operbll.GetEntity(keyValue);
         return(ToJsonResult(data));
     }
     else if (type == 3)
     {//拜访人员
         CarUserBLL CarUserbll = new CarUserBLL();
         var        data       = CarUserbll.GetEntity(keyValue);
         return(ToJsonResult(data));
     }
     else
     {
         HazardouscarBLL haza = new HazardouscarBLL();
         var             data = haza.GetEntity(keyValue);
         return(ToJsonResult(data));
     }
 }
コード例 #2
0
        public ActionResult ApprovalIsAdopt(string keyValue, int type)
        {
            int State = 0;

            if (type == 3)
            {//人员
                var uentity = new CarUserBLL().GetEntity(keyValue);
                if (uentity != null)
                {
                    State = uentity.AppStatue;
                }
            }
            else if (type == 0)
            {//车辆
                var ventity = new VisitcarBLL().GetEntity(keyValue);
                if (ventity != null)
                {
                    State = ventity.AppStatue;
                }
            }
            return(Content(State.ToString()));
        }