Example #1
0
        /// <summary>
        /// 各区县客户经理目标值编辑页面
        /// </summary>
        /// <param name="month">月份</param>
        /// <param name="targetTagId"></param>
        /// <param name="districtId">区县ID</param>
        /// <returns></returns>
        public ActionResult EditManagerTargetValue(string month, long?targetTagId, long?districtId)
        {
            try
            {
                if (targetTagId == null || districtId == null || string.IsNullOrEmpty(month))
                {
                    var user = _UserAppService.GetUser(CurrUserId());
                    targetTagId = 2;
                    districtId  = user.DistrictId;
                    month       = DateTime.Now.ToString("yyyyMM");
                }
                ViewData["managerJson"] = _NewTargetValueAppService.GetManagerJson(districtId);
                ViewData["month"]       = month;
                ViewData["targetTagId"] = targetTagId;
                ViewData["districtId"]  = districtId;

                if (districtId != null)
                {
                    var dis = _DistrictAppService.GetDistrict(districtId.Value);
                    if (dis != null)
                    {
                        ViewData["districtName"] = dis.Name;
                    }
                }
            }
            catch (Exception ex)
            {
                throw new UserFriendlyException(ex.Message);
            }
            return(View());
        }
Example #2
0
 public ActionResult MarkScore(string month, long?districtId)
 {
     try
     {
         ViewData["subitemJson"] = JSON.DecodeToStr(_SubitemAppService.AllSubitemList());
         ViewData["month"]       = month;
         if (districtId != null)
         {
             var dis = _DistrictAppService.GetDistrict(districtId.Value);
             if (dis != null)
             {
                 ViewData["districtName"] = dis.Name;
             }
         }
         else
         {
             var user = _UserAppService.GetUser(CurrUserId());
             districtId = user.DistrictId.Value;
             ViewData["districtName"] = user.District.Name;
         }
         ViewData["districtId"] = districtId;
     }
     catch (Exception ex)
     {
         throw new UserFriendlyException(ex.Message);
     }
     return(View());
 }
Example #3
0
        public ActionResult EditDistrict(long?id)
        {
            var model = new DistrictInput {
                TenantId = AbpSession.TenantId, IsUse = true
            };

            if (id != null && id != 0)
            {
                var nav = _districtAppService.GetDistrict(id.Value);
                model = nav.MapTo <DistrictInput>();
            }
            return(View("Easyman.FwWeb.Views.Admin.EditDistrict", model));
        }