本文整理汇总了C#中User.InsertToEvent方法的典型用法代码示例。如果您正苦于以下问题:C# User.InsertToEvent方法的具体用法?C# User.InsertToEvent怎么用?C# User.InsertToEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类User
的用法示例。
在下文中一共展示了User.InsertToEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: joinBTN_Click
// adding the user to the event
protected void joinBTN_Click(object sender, EventArgs e)
{
if (Session["UserDeatail"] == null) return;
DataTable dt = (DataTable)HttpContext.Current.Session["UserDeatail"];
User Newuser = new User();
User U1 = new User();
U1.Email = dt.Rows[0]["Email"].ToString();
int num = U1.InsertToEvent(eventNum);
Response.Redirect("MyEvents.aspx");
}
示例2: JoinBtn_Click
// join user to event
protected void JoinBtn_Click(object sender, EventArgs e)
{
//CategoryFilter();
if (Session["Fname"] != null)
{
Eventnum = (eventNumHF.Value);
if (Session["UserDeatail"] == null) return;
DataTable dt = (DataTable)HttpContext.Current.Session["UserDeatail"];
User U1 = new User();
U1.Email = dt.Rows[0]["Email"].ToString();
int num = U1.InsertToEvent(Eventnum);
//pop register
if (num >= 1)
{
SendMail(U1.Email, Eventnum);
ShowPopup("you have added to the event Successfully");
Response.Redirect("MyEvents.aspx");
}
else if (num == -1)
{
ShowPopup("You Are already register to this event");
}
else if (num == 0)
{
ShowPopup("Error register faild please try agin later");
}
}
else
{
Response.Redirect("MessagePage.aspx?ans=NotLoginME");
}
}
示例3: UserToEvent
public string UserToEvent(string Email, string EventNum)
{
JavaScriptSerializer js = new JavaScriptSerializer();
string jsonString = js.Serialize(" faild");
try
{
User U1 = new User();
U1.Email = Email;
int num = U1.InsertToEvent(EventNum);
if (num > 0)
{
jsonString = js.Serialize("Success");
}
else
{
jsonString = js.Serialize("Event is full!!!");
}
}
catch (Exception ex)
{
jsonString = js.Serialize("error in treasure.Login --- " + ex.Message);
}
return jsonString;
}