public JsonResult AssignPoeAndYammerBind() { var common = new CommonClient(); var mySubscription = common.GetMySubscription(Session["emailid"].ToString()); var checkmapping = common.CheckMapping(int.Parse(Session["id"].ToString()), int.Parse(Session["subid"].ToString())); var ownsub = new OwnSubscribtion(); if (mySubscription != null) { var ismySub = mySubscription.Count(a => a.Subscriptionid == int.Parse(Session["subid"].ToString())); if (ismySub != 0) { ownsub.IsSub = true; } else { ownsub.IsSub = false; } if (Session["YammerSignUp"] != null) { ownsub.Yammer = true; } else { ownsub.Yammer = false; } if (checkmapping != 0) { ownsub.Mapping = true; } else { ownsub.Mapping = false; } //ownsub.Mapping; ownsub.SubId = int.Parse(Session["subid"].ToString()); return(JsonResponse(ownsub)); } else { return(null); } }
public JsonResult CheckNetworkMapping() { var common = new CommonClient(); if (Session["id"] != null && Session["subid"] != null) { var mySubscription = common.CheckMapping(int.Parse(Session["id"].ToString()), int.Parse(Session["subid"].ToString())); if (int.Parse(Session["subid"].ToString()) != -1) { return(JsonResponse(mySubscription)); } else { return(JsonResponse(int.Parse(Session["subid"].ToString()))); } } else { return(null); } }