public ActionResult ChangeOperatons() { string TenantCode = Request["tenantCode"].ToString(); SelectedUserViewModel model = new SelectedUserViewModel(); TenantViewModel entity = _OperationsService.GetTenantInfo(TenantCode); if (entity == null) return Content("Error"); model.TenantCode = entity.TenantCode; model.TenantName = entity.TenantName; model.SuperTenantCode = entity.SuperTenantID; model.TenantType = entity.TenantType; model.UserCode = entity.RegisterUserCode; model.UserName = entity.RegisterUserName; SessionUserInfo.SelectedOperate = model; Session[SESSION_NAME] = SessionUserInfo; return Content("Success"); }
//切换至下级运营商页面 public ActionResult ChildOperation(string tenantCode) { if (!string.IsNullOrEmpty(tenantCode)) { SelectedUserViewModel model = new SelectedUserViewModel(); TenantViewModel entity = _OperationsService.GetTenantInfo(tenantCode); if (entity != null) { model.TenantCode = entity.TenantCode; model.TenantName = entity.TenantName; model.SuperTenantCode = entity.SuperTenantID; model.TenantType = entity.TenantType; model.UserCode = entity.RegisterUserCode; model.UserName = entity.RegisterUserName; SessionUserInfo.SelectedOperate = model; } } if (SessionUserInfo.SelectedOperate == null) { return RedirectToAction("Index"); } OperateMyDataViewModel operate = _OperationsService.GetOperateMyData(SessionUserInfo.SelectedOperate.UserCode); if (string.IsNullOrEmpty(operate.TenantLogoImgURl)) { operate.TenantLogoImgURl = UploadImageHelper.TenantImgUrl; } else { operate.TenantLogoImgURl = UploadImgPath + @"/" + operate.TenantLogoImgURl; } ViewData["OperateModel"] = operate; ViewData["Balance"] = _OperationsService.GetTenantBalance(SessionUserInfo.SelectedOperate.TenantCode); ViewData["AccountDetail"] = _OperationsService.SelectAccountDetailRecentRecord(SessionUserInfo.SelectedOperate.TenantCode, 5); ViewData["IsChild"] = SessionUserInfo.SelectedOperate.SuperTenantCode == SessionUserInfo.TenantCode; return View("Operation/ChildOperation"); }