public LearnController() { ViewBag.user = user; client = new tLearingServiceClient(); dicclient = new YogaDicItemServiceClient(); interclient = new InterestServiceClient(); msgclient = new tMessageServiceClient(); clientUser = new YogaUserServiceClient(); userDetclient = new YogaUserDetailServiceClient(); method = new method(); Signclient = new tSignServiceClient(); zanclient = new tZanModelsServiceClient(); #region 登录者的级别 if (user.UserType == 0) { ViewYogaUserDetail temp = new ViewYogaUserDetail(); temp = userDetclient.GetYogaUserDetailById(user.Uid); if (temp != null) { ViewBag.level = temp.Ulevel; } } else//导师级别 { ViewYogisModels vyogism = new ViewYogisModels(); using (YogisModelsServiceClient mclient = new YogisModelsServiceClient()) { vyogism = mclient.GetYogisModelsById(user.Uid); if (vyogism != null) { ViewBag.level = vyogism.YogisLevel; } } } #endregion #region 站内信-信息数量 int tinstatcount = 0; int follcount = 0; int zancount = 0; int msgcount = 0; method.InstationInfo(user.Uid, out tinstatcount, out follcount, out zancount, out msgcount); ViewBag.tinstatcount = tinstatcount; ViewBag.follcount = follcount; ViewBag.zancount = zancount; ViewBag.msgcount = msgcount; ViewBag.AllCount = tinstatcount + follcount + zancount + msgcount; #endregion }
public tInstationInfoController() { ViewBag.user = user; method = new method(); client = new tInstationInfoServiceClient(); list = new List <ViewtInstationInfo>(); zanclient = new tZanModelsServiceClient(); followclient = new FollowServiceClient(); messageclient = new tMessageServiceClient(); clientUser = new YogaUserServiceClient(); clientModel = new YogisModelsServiceClient(); udclient = new YogaUserDetailServiceClient(); writelogclient = new tWriteLogServiceClient(); #region 登录者的级别 if (user.UserType == 0) { ViewYogaUserDetail temp = new ViewYogaUserDetail(); temp = udclient.GetYogaUserDetailById(user.Uid); if (temp != null) { ViewBag.level = temp.Ulevel; ViewBag.Gender = temp.Gender; } } else//导师级别 { ViewYogisModels vyogism = new ViewYogisModels(); vyogism = clientModel.GetYogisModelsById(user.Uid); if (vyogism != null) { ViewBag.level = vyogism.YogisLevel; ViewBag.Gender = vyogism.Gender; } } #endregion #region 站内信-信息数量 int tinstatcount = 0; int follcount = 0; int zancount = 0; int msgcount = 0; method.InstationInfo(user.Uid, out tinstatcount, out follcount, out zancount, out msgcount); ViewBag.tinstatcount = tinstatcount; ViewBag.follcount = follcount; ViewBag.zancount = zancount; ViewBag.msgcount = msgcount; ViewBag.AllCount = tinstatcount + follcount + zancount + msgcount; #endregion }
public YogaGuruController() { ViewBag.user = user; client = new YogisModelsServiceClient(); clientUser = new YogaUserServiceClient(); clientMsg = new tMessageServiceClient(); clientFoll = new FollowServiceClient(); clientDetail = new YogaUserDetailServiceClient(); logClient = new tWriteLogServiceClient(); clientPic = new YogaPictureServiceClient(); dicclient = new YogaDicItemServiceClient(); zanclient = new tZanModelsServiceClient(); method = new method(); #region 登录者的级别 if (user.UserType == 0) { ViewYogaUserDetail temp = new ViewYogaUserDetail(); temp = clientDetail.GetYogaUserDetailById(user.Uid); if (temp != null) { ViewBag.level = temp.Ulevel; } } else { ViewYogisModels vyogism = new ViewYogisModels(); vyogism = client.GetYogisModelsById(user.Uid); if (vyogism != null) { ViewBag.level = vyogism.YogisLevel; } } #endregion #region 站内信-信息数量 int tinstatcount = 0; int follcount = 0; int zancount = 0; int msgcount = 0; method.InstationInfo(user.Uid, out tinstatcount, out follcount, out zancount, out msgcount); ViewBag.tinstatcount = tinstatcount; ViewBag.follcount = follcount; ViewBag.zancount = zancount; ViewBag.msgcount = msgcount; ViewBag.AllCount = tinstatcount + follcount + zancount + msgcount; #endregion }
public method() { client = new ClassServiceClient(); dicclient = new YogaDicItemServiceClient(); interclient = new InterestServiceClient(); msgclient = new tMessageServiceClient(); clientUser = new YogaUserServiceClient(); clientbanner = new tBannerServiceClient(); udclient = new YogaUserDetailServiceClient(); modelsclient = new YogisModelsServiceClient(); userloginInfoclient = new tUserLoginInfoServiceClient(); tinstaclient = new tInstationInfoServiceClient(); followclient = new FollowServiceClient(); zanclient = new tZanModelsServiceClient(); messageclient = new tMessageServiceClient(); cenclient = new IYogaKoo.Client.CentersServiceClient(); }
public JsonResult iZanHand(int id) { try { int iCount = 0; ViewtZanModels zanEntity = new ViewtZanModels(); using (tZanModelsServiceClient zanclient = new tZanModelsServiceClient()) { zanEntity = zanclient.GetByFromToUid(id, user.Uid, 2); if (zanEntity == null) { zanEntity = new ViewtZanModels(); zanEntity.iFromUid = user.Uid; zanEntity.iToUid = id; zanEntity.iType = user.UserType; zanEntity.iToType = 2; zanEntity.CreateDate = DateTime.Now; zanEntity.loginType = 0; zanclient.Add(zanEntity); //查询Count ViewtLearing model = client.GetById(id); iCount = zanclient.Count(id, user.Uid, 2); model.iZanNums = iCount; client.Update(model);//推荐(赞)量+1 } else { return(Json(new { code = 2 })); } } return(Json(new { code = 0, iCount = iCount })); } catch (Exception ex) { return(Json(new { code = 1 })); } }
public tZanModelsController() { ViewBag.user = user; client = new tZanModelsServiceClient(); list = new List <ViewtZanModels>(); method = new Commons.Helper.method(); #region 站内信-信息数量 int tinstatcount = 0; int follcount = 0; int zancount = 0; int msgcount = 0; method.InstationInfo(user.Uid, out tinstatcount, out follcount, out zancount, out msgcount); ViewBag.tinstatcount = tinstatcount; ViewBag.follcount = follcount; ViewBag.zancount = zancount; ViewBag.msgcount = msgcount; ViewBag.AllCount = tinstatcount + follcount + zancount + msgcount; #endregion }
public ActionResult PicList2(int id, int page = 1) { ///Follow iType ViewBag.UserType = 1; ViewBag.id = id; int strUid = user.Uid; int iLoginID = user.Uid;//登录用户ID ViewBag.iLoginID = user.Uid; #region 导师专页 基本信息 ViewYogisModels temp = new ViewYogisModels(); temp = client.GetYogisModelsById(id); ///昵称 ViewBag.NickName = clientUser.GetYogaUserById(temp.UID).NickName; strUid = temp.UID; ViewBag.strUid = temp.UID; ///位置 string strCountryID = ""; string strProvinceID = ""; string strCityID = ""; string strDistrictID = ""; if (temp.CountryID != null && temp.CountryID != 0) { strCountryID = GetItemName(temp.CountryID.Value) + "· "; } if (temp.ProvinceID != null && temp.ProvinceID != 0) { strProvinceID = GetItemName(temp.ProvinceID.Value) + " · "; } if (temp.CityID != null && temp.CityID != 0) { strCityID = GetItemName(temp.CityID.Value) + " ·"; } if (temp.DistrictID != null && temp.DistrictID != 0) { strDistrictID = GetItemName(temp.DistrictID.Value); } ViewBag.AddRessName = strCountryID + strProvinceID + strCityID + strDistrictID; ///流派 if (!string.IsNullOrEmpty(temp.YogaTypeid)) { string[] ids = temp.YogaTypeid.Split(','); foreach (var i in ids) { ViewBag.YogaTypeid += GetItemName(Convert.ToInt32(i)) + " "; } } else { ViewBag.YogaTypeid = ""; } ViewBag.listGroup = temp; #endregion //推荐的数据 using (tZanModelsServiceClient zclient = new tZanModelsServiceClient()) { List <ViewtZanModels> listz = zclient.GettZanUid(id); ViewBag.tzancount = listz.Count(); } //关注 粉丝 人气 ViewFollow viewMoel = new ViewFollow(); using (FollowServiceClient followClient = new FollowServiceClient()) { ViewBag.iCount = followClient.GetFollowByUid(id); ViewBag.FCount = followClient.GetFollowByCount(id); } #region 相册 List <ViewYogaPicture> listPic = new List <ViewYogaPicture>(); listPic = clientPic.GetUidList(id); #endregion return(View(listPic)); }