Exemplo n.º 1
0
        public ActionResult GetYYYone()
        {
            var        id   = Request["id"] == null ? 0 : Convert.ToInt64(Request["id"]);
            T_YxPerson temp = T_YxPersonService.LoadEntities(x => x.ID == id).FirstOrDefault();

            return(Content(Common.SerializerHelper.SerializeToString(new { serverData = temp, msg = "yes" })));
        }
Exemplo n.º 2
0
        public ActionResult Index()
        {
            var City = T_CityService.LoadEntities(x => x.DelFlag == Delflag).DefaultIfEmpty();

            ViewBag.City = City;
            ViewBag.json = Json(new { rows = City }, JsonRequestBehavior.AllowGet);
            ViewBag.YYY  = T_YxPersonService.LoadEntities(x => x.DEL == 0).DefaultIfEmpty();
            return(View());
        }
Exemplo n.º 3
0
        public ActionResult NewAddListYXY(T_YxPerson typ)
        {
            typ.AddTime   = MvcApplication.GetT_time();
            typ.ADDuserID = LoginUser.ID;
            typ.DEL       = 0;
            if (typ.ID <= 0)
            {
                T_YxPersonService.AddEntity(typ);
            }
            else
            {
                T_YxPersonService.EditEntity(typ);
            }

            return(Content("ok"));
        }
Exemplo n.º 4
0
        public ActionResult DelListYXY()
        {
            var id   = Convert.ToInt64(Request["id"]);
            var temp = T_YxPersonService.LoadEntities(x => x.ID == id).FirstOrDefault();

            temp.DEL = 1;
            if (temp != null)
            {
                if (T_YxPersonService.EditEntity(temp))
                {
                    return(Json("ok", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json("no", JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(Json("null", JsonRequestBehavior.AllowGet));
            }
        }
Exemplo n.º 5
0
        //-------------------------业务员管理分割线-------------------------
        #region 获取营销员列表
        public ActionResult GetListYXY()
        {
            int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1;

            int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 5;

            int totalCount   = 0;
            var userInfoList = T_YxPersonService.LoadPageEntities(pageIndex, pageSize, out totalCount, x => x.DEL == 0, x => x.ID, true);
            var temp         = from u in userInfoList
                               select new
            {
                ID         = u.ID,
                PersonName = u.PersonName,
                Photo      = u.Photo,
                Addess     = u.Addess,
                AddTime    = u.AddTime,
                Gender     = u.Gender,
                age        = u.age,
                RuzTime    = u.RuzTime
            };

            return(Json(new { rows = temp, total = totalCount }, JsonRequestBehavior.AllowGet));
        }