当前位置: 首页>>代码示例>>C#>>正文


C# Service1Client.MesajiYaz方法代码示例

本文整理汇总了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");
     }
 }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:9,代码来源:Chatroom.aspx.cs

示例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();
             */
        }
开发者ID:inancakcan,项目名称:kalibrasyon,代码行数:44,代码来源:Chatroom.aspx.cs


注:本文中的Service1Client.MesajiYaz方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。