本文整理汇总了C#中Api.Groups.Groups.GetGroupDeUserId方法的典型用法代码示例。如果您正苦于以下问题:C# Api.Groups.Groups.GetGroupDeUserId方法的具体用法?C# Api.Groups.Groups.GetGroupDeUserId怎么用?C# Api.Groups.Groups.GetGroupDeUserId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Api.Groups.Groups
的用法示例。
在下文中一共展示了Api.Groups.Groups.GetGroupDeUserId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Signup
public ActionResult Signup()
{
logger.Error("Register");
User _user = (User)Session["User"];
Domain.Socioboard.Domain.User user = new Domain.Socioboard.Domain.User();
Session["AjaxLogin"] = "register";
string retmsg = string.Empty;
try
{
System.IO.StreamReader sr = new System.IO.StreamReader(Request.InputStream);
string line = "";
line = sr.ReadToEnd();
JObject jo = JObject.Parse(line);
user.PaymentStatus = "unpaid";
user.AccountType = Server.UrlDecode((string)jo["package"]);
user.CreateDate = DateTime.Now;
user.ExpiryDate = DateTime.Now.AddDays(30);
user.Id = Guid.NewGuid();
user.UserName = Server.UrlDecode((string)jo["firstname"]) + " " + Server.UrlDecode((string)jo["lastname"]);
user.EmailId = Server.UrlDecode((string)jo["email"]);
user.Password = Server.UrlDecode((string)jo["password"]);
user.UserStatus = 1;
if (_user != null)
{
if (_user.ActivationStatus == "1") //If Login from Facebook, then ActivationStatus would be 1, refer to FacebookManager Controller
{
user.ActivationStatus = "1";
user.SocialLogin = _user.SocialLogin;
user.ProfileUrl = _user.ProfileUrl;
}
else
{
user.ActivationStatus = "0";
}
}
else
{
user.ActivationStatus = "0";
}
string firstName = Server.UrlDecode((string)jo["firstname"]);
string lastName = Server.UrlDecode((string)jo["lastname"]);
Api.User.User objApiUser = new Api.User.User();
//string res_Registration = objApiUser.Register(user.EmailId, user.Password, user.AccountType, user.UserName, user.ActivationStatus);
string res_Registration = string.Empty;
if (Session["twitterlogin"] != null)
{
if ((string)Session["twitterlogin"] == "twitterlogin")
{
res_Registration = objApiUser.RegisterbyTwitter(user.EmailId, user.Password, user.AccountType, user.UserName, user.SocialLogin, user.ProfileUrl, user.ActivationStatus);
}
else
{
res_Registration = objApiUser.Register(user.EmailId, user.Password, user.AccountType, user.UserName, user.ActivationStatus);
}
}
else
{
res_Registration = objApiUser.Register(user.EmailId, user.Password, user.AccountType, user.UserName, user.ActivationStatus);
}
logger.Error("res_Registration: " + res_Registration);
if (res_Registration != "Email Already Exists")
{
if (user != null)
{
Api.User.User obj = new Api.User.User();
user = (User)(new JavaScriptSerializer().Deserialize(obj.Login(user.EmailId, user.Password), typeof(User)));
Session["User"] = user;
if (Session["fblogin"] != null)
{
string accesstoken = (string)Session["AccesstokenFblogin"];
Api.Facebook.Facebook objfacebook = new Api.Facebook.Facebook();
Api.Groups.Groups objgroup = new Api.Groups.Groups();
//Domain.Socioboard.Domain.Groups group = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(objgroup.GetGroupDetailsByUserId(user.Id.ToString()), typeof(Domain.Socioboard.Domain.Groups)));
Groups obpgrp = (Groups)(new JavaScriptSerializer().Deserialize(objgroup.GetGroupDeUserId(user.Id.ToString()), typeof(Groups)));
objfacebook.AddFacebookAccountWithloginAsync(accesstoken, user.Id.ToString(), obpgrp.Id.ToString());
}
if (Session["googlepluslogin"] != null)
{
string accesstoken = (string)Session["AccesstokenFblogin"];
Api.Youtube.Youtube objYoutube = new Api.Youtube.Youtube();
Api.Groups.Groups objgroup = new Api.Groups.Groups();
//Domain.Socioboard.Domain.Groups group = (Domain.Socioboard.Domain.Groups)(new JavaScriptSerializer().Deserialize(objgroup.GetGroupDetailsByUserId(user.Id.ToString()), typeof(Domain.Socioboard.Domain.Groups)));
Groups grp = (Groups)(new JavaScriptSerializer().Deserialize(objgroup.GetGroupDeUserId(user.Id.ToString()), typeof(Groups)));
objYoutube.AddYoutubeAccountwithLoginAsync(ConfigurationManager.AppSettings["YtconsumerKey"], ConfigurationManager.AppSettings["YtconsumerSecret"], ConfigurationManager.AppSettings["Ytredirect_uri"], user.Id.ToString(), grp.Id.ToString(), accesstoken);
}
retmsg = "user";
}
//Domain.Socioboard.Domain.Invitation _Invitation = (Domain.Socioboard.Domain.Invitation)Session["InvitationInfo"];
Api.Invitation.Invitation ApiInvitation = new Api.Invitation.Invitation();
if (Session["InvitationCode"] != null)
{
string invitationcode = Session["InvitationCode"].ToString();
ApiInvitation.AddInvitationInfoBycode(invitationcode, user.EmailId, user.Id.ToString());
}
//if (_Invitation != null)
//{
// if (user.EmailId == _Invitation.FriendEmail)
//.........这里部分代码省略.........