本文整理汇总了C#中SocioBoard.Model.UserRepository.UpdateAccountType方法的典型用法代码示例。如果您正苦于以下问题:C# UserRepository.UpdateAccountType方法的具体用法?C# UserRepository.UpdateAccountType怎么用?C# UserRepository.UpdateAccountType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SocioBoard.Model.UserRepository
的用法示例。
在下文中一共展示了UserRepository.UpdateAccountType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRequest
void ProcessRequest()
{
if (!string.IsNullOrEmpty(Request.QueryString["op"]))
{
if (Request.QueryString["op"] == "removedata")
{
string network = Request.QueryString["network"];
string message = string.Empty;
var users = Request.QueryString["data[]"];
Messages mstable = new Messages();
DataSet ds = DataTableGenerator.CreateDataSetForTable(mstable);
DataTable dtt = ds.Tables[0];
string page = Request.QueryString["page"];
if (page == "feed")
{
AjaxFeed ajxfed = new AjaxFeed();
DataTable dt = null;
if (network == "facebook")
{
dt = (DataTable)Session["FacebookFeedDataTable"];
}
else if (network == "twitter")
{
dt = (DataTable)Session["TwitterFeedDataTable"];
}
else if (network == "linkedin")
{
dt = (DataTable)Session["LinkedInFeedDataTable"];
}
foreach (var parent in users)
{
DataView dv = new DataView(dtt);
DataRow[] foundRows = dt.Select("ProfileId = '" + parent + "'");
foreach (var child in foundRows)
{
dtt.ImportRow(child);
}
}
message = ajxfed.BindData(dtt);
}
else if (page == "message")
{
WooSuite.Message.AjaxMessage ajxmes = new WooSuite.Message.AjaxMessage();
DataSet dss = (DataSet)Session["MessageDataTable"];
//foreach (var parent in users)
//{
DataView dv = new DataView(dtt);
DataRow[] foundRows = dss.Tables[0].Select("ProfileId = '" + users + "'");
foreach (var child in foundRows)
{
dtt.ImportRow(child);
}
//}
message = ajxmes.BindData(dtt);
}
Response.Write(message);
}
else if (Request.QueryString["op"] == "upgradeplan")
{
User user = (User)Session["LoggedUser"];
UserRepository userRepo = new UserRepository();
string accounttype = Request.QueryString["planid"];
if (accounttype == AccountType.Deluxe.ToString().ToLower())
{
userRepo.UpdateAccountType(user.Id, AccountType.Deluxe.ToString());
user.AccountType = AccountType.Deluxe.ToString();
}
else if (accounttype == AccountType.Standard.ToString().ToLower())
{
userRepo.UpdateAccountType(user.Id, AccountType.Standard.ToString());
user.AccountType = AccountType.Standard.ToString();
}
else if (accounttype == AccountType.Premium.ToString().ToLower())
{
userRepo.UpdateAccountType(user.Id, AccountType.Premium.ToString());
user.AccountType = AccountType.Premium.ToString();
}
Session["LoggedUser"] = user;
}
else if (Request.QueryString["op"] == "bindrssActive")
{
User user = (User)Session["LoggedUser"];
RssFeedsRepository rssFeedsRepo = new RssFeedsRepository();
List<RssFeeds> lstrssfeeds = rssFeedsRepo.getAllActiveRssFeeds(user.Id);
TwitterAccountRepository twtAccountRepo = new TwitterAccountRepository();
if (lstrssfeeds != null)
{
if (lstrssfeeds.Count != 0)
{
int rssCount = 0;
string rssData = string.Empty;
rssData += "<h2 class=\"league section-ttl rss_header\">Active RSS Feeds</h2>";
foreach (RssFeeds item in lstrssfeeds)
{
//.........这里部分代码省略.........
示例2: Page_Load
//.........这里部分代码省略.........
}
#endregion
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
logger.Error(ex.StackTrace);
}
#region Count Used Accounts
try
{
if (user.AccountType.ToString().ToUpper() == "SMALL BUSINESS".ToUpper())
tot_acc = 25;
else if (user.AccountType.ToString().ToUpper() == "CORPORATION".ToUpper())
tot_acc = 60;
else if (user.AccountType.ToString().ToUpper() == "INDIVIDUAL".ToUpper())
tot_acc = 10;
profileCount = objSocioRepo.getAllSocialProfilesOfUser(user.Id).Count;
Session["ProfileCount"] = profileCount;
Session["TotalAccount"] = tot_acc;
usedAccount.InnerHtml = " using " + profileCount + " of " + tot_acc;
}
catch (Exception ex)
{
logger.Error(ex.StackTrace);
}
#endregion
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
{
try
{
userrepo.UpdateAccountType(user.Id, Request.QueryString["type"]);
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
logger.Error(ex.StackTrace);
}
}
acrossProfile.InnerHtml = "Across " + user.UserName + "'s Twitter and Facebook accounts";
teamMem.InnerHtml = "managing " + user.UserName;
try
{
News nws = objNewsRepo.getNewsForHome();
divNews.InnerHtml = nws.NewsDetail;
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
logger.Error(Err.StackTrace);
}
try
{
ArrayList lstads = objAdsRepo.getAdsForHome();
foreach (var item in lstads)
{
Array temp = (Array)item;
imgAds.ImageUrl = temp.GetValue(2).ToString();
break;
// ads.ImageUrl;
}
}
catch (Exception Err)
示例3: Page_Load
//.........这里部分代码省略.........
logger.Error(ex.StackTrace);
}
#endregion
try
{
Groups lstDetails = objGroupRepository.getGroupName(team.GroupId);
if (lstDetails.GroupName != "Socioboard")
{
expander.Attributes.CssStyle.Add("display", "none");
}
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
}
//this is used to check whether facebok account Already Exist
if (Session["alreadyexist"] != null)
{
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('This Profile is Already Added please add aother Account!');", true);
Session["alreadyexist"] = null;
}
if ( Session["alreadypageexist"] != null)
{
ScriptManager.RegisterStartupScript(this, GetType(), "showalert", "alert('This Page is Already Added please add aother Page!');", true);
Session["alreadypageexist"] = null;
}
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
{
try
{
userrepo.UpdateAccountType(user.Id, Request.QueryString["type"]);
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
logger.Error(ex.StackTrace);
}
}
//acrossProfile.InnerHtml = "Across " + user.UserName + "'s Twitter and Facebook accounts";
teamMem.InnerHtml = "managing " + user.UserName;
try
{
News nws = objNewsRepo.getNewsForHome();
//divNews.InnerHtml = nws.NewsDetail;
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
logger.Error(Err.StackTrace);
}
try
{
ArrayList lstads = objAdsRepo.getAdsForHome();
if (lstads.Count < 1)
{
if (user.PaymentStatus.ToUpper() == "PAID")
{
bindads.InnerHtml = "<img src=\"../Contents/img/admin/ads.png\" alt=\"\" >";
}
else
{
示例4: Page_Load
//.........这里部分代码省略.........
//#endregion
#region Count Used Accounts
try
{
if (user.AccountType.ToString().ToLower() == AccountType.Deluxe.ToString().ToLower())
tot_acc = 20;
else if (user.AccountType.ToString().ToLower() == AccountType.Standard.ToString().ToLower())
tot_acc = 10;
else if (user.AccountType.ToString().ToLower() == AccountType.Premium.ToString().ToLower())
tot_acc = 50;
else if (user.AccountType.ToString().ToLower() == AccountType.Free.ToString().ToLower())
tot_acc = 5;
profileCount = objSocioRepo.getAllSocialProfilesOfUser(user.Id).Count;
Session["ProfileCount"] = profileCount;
Session["TotalAccount"] = tot_acc;
usedAccount.InnerHtml = " using " + profileCount + " of " + tot_acc;
}
catch (Exception ex)
{
logger.Error(ex.StackTrace);
}
#endregion
if (!string.IsNullOrEmpty(Request.QueryString["type"]))
{
try
{
userrepo.UpdateAccountType(user.Id, Request.QueryString["type"]);
}
catch (Exception ex)
{
Console.WriteLine(ex.StackTrace);
logger.Error(ex.StackTrace);
}
}
acrossProfile.InnerHtml = "Across " + user.UserName + "'s Twitter and Facebook accounts";
teamMem.InnerHtml = "managing " + user.UserName;
try
{
News nws = objNewsRepo.getNewsForHome();
divNews.InnerHtml = nws.NewsDetail;
}
catch (Exception Err)
{
Console.Write(Err.StackTrace);
logger.Error(Err.StackTrace);
}
try
{
ArrayList lstads = objAdsRepo.getAdsForHome();
if (lstads.Count < 1)
{
if (user.PaymentStatus.ToUpper() == "PAID")
{
bindads.InnerHtml = "<img src=\"../Contents/img/admin/ads.png\" alt=\"\" >";
}
else
{