Example #1
0
        // GET: Center
        public ActionResult Index()
        {
            ViewBag.UserName     = DBUserInfo.NickName;
            ViewBag.HeadImageUrl = CommFunction.HeadImage(DBUserInfo.openID);
            ViewBag.CompanyName  = "佣金0.00元";
            ViewBag.openid       = DBUserInfo.openID;
            //默认激活那个页面
            Actived(Request.RequestContext.RouteData.Values["id"] != null ? Request.RequestContext.RouteData.Values["id"].ToString().ToInt() : 1);

            //客户列表数据
            var queryCustomerList = from row in Customer.GetCustomerList("CrUserID='{0}'".FormatWith(DBUserInfo.UserID)).AsEnumerable()
                                    select new CustomerQuery
            {
                ID    = row.Field <Guid>("ID"),
                Name  = row.Field <string>("CusName"),
                Num   = row.Field <int>("OrderNum"),
                Phone = row.Field <string>("CusPhone"),
                Sex   = row.Field <string>("Sex")
            };

            ViewBag.CustomerList = queryCustomerList.ToList();
            //获取项目列表
            ViewBag.ProjectList = Project.GetChooseList();
            //获取结佣信息
            ViewBag.UserWaitFee = Fee.GetFee(false, DBUserInfo.UserID.ToGuid()).ToMoney(2);
            ViewBag.UserOverFee = Fee.GetFee(true, DBUserInfo.UserID.ToGuid()).ToMoney(2);

            ViewBag.ActivityRule = Setting.FindFirst().ActivityRule;
            return(View());
        }
Example #2
0
        /// <summary>
        /// 获取绑定用户列表
        /// </summary>
        /// <returns></returns>
        public ActionResult GetContactList()
        {
            if (this.DBUserInfo == null)
            {
                return(ErrorPage());
            }
            DataTable dt    = new DataTable();
            var       query = from row in dt.AsEnumerable()
                              select new
            {
                UserId   = row.Field <Guid>("UserID"),
                Truename = row.Field <string>("TrueName"),
                Img      = CommFunction.HeadImage(row.Field <string>("WxOpenID")),
                DeptName = row.Field <string>("DeptName")
            };

            return(Json(query.ToList(), JsonRequestBehavior.AllowGet));
        }