本文整理汇总了C#中Service1Client.MesajiYaz方法的典型用法代码示例。如果您正苦于以下问题:C# Service1Client.MesajiYaz方法的具体用法?C# Service1Client.MesajiYaz怎么用?C# Service1Client.MesajiYaz使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Service1Client
的用法示例。
在下文中一共展示了Service1Client.MesajiYaz方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: lnkKonusmaTalebi_Click
protected void lnkKonusmaTalebi_Click(object sender, EventArgs e)
{
using (Service1Client proxy = new Service1Client())
{
Guid ToUserId = new Guid(ddlOnlineUsers.SelectedValue);
string MessageText = Context.User.Identity.Name + ", " + ddlOnlineUsers.SelectedItem.Text + " ile konuşmak istiyor";
proxy.MesajiYaz(Convert.ToInt32(lblRoomId.Text), new Guid(Session["ChatUserID"].ToString()), ToUserId, MessageText, "gray");
}
}
示例2: InsertMessage
/// <summary>
/// This will insert the passed text to the message table in the database
/// </summary>
private void InsertMessage(string text)
{
string MessageText = "";
string MessageColor = "";
using (Service1Client proxy = new Service1Client())
{
if (String.IsNullOrEmpty(text))
{
MessageText = txtMessage.Text.Replace("<", "");
MessageColor = ddlColor.SelectedValue;
}
else
{
MessageText = text;
MessageColor = "gray";
}
proxy.MesajiYaz(Convert.ToInt32(lblRoomId.Text), new Guid(Session["ChatUserID"].ToString()), new Guid("00000000-0000-0000-0000-000000000000"), MessageText, MessageColor);
}
/*
LinqChatDataContext db = new LinqChatDataContext();
Message message = new Message();
message.RoomID = Convert.ToInt32(lblRoomId.Text);
message.UserID= new Guid(Session["ChatUserID"].ToString());
if (String.IsNullOrEmpty(text))
{
message.Text = txtMessage.Text.Replace("<", "");
message.Color = ddlColor.SelectedValue;
}
else
{
message.Text = text;
message.Color = "gray";
}
message.ToUserID = null; // in the future, we will use this value for private messages
message.TimeStamp = DateTime.Now;
db.Messages.InsertOnSubmit(message);
db.SubmitChanges();
*/
}