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


C# GlobusHttpHelper.postFormDataRef方法代码示例

本文整理汇总了C#中GlobusHttpHelper.postFormDataRef方法的典型用法代码示例。如果您正苦于以下问题:C# GlobusHttpHelper.postFormDataRef方法的具体用法?C# GlobusHttpHelper.postFormDataRef怎么用?C# GlobusHttpHelper.postFormDataRef使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GlobusHttpHelper的用法示例。


在下文中一共展示了GlobusHttpHelper.postFormDataRef方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: PostFinalMsg


//.........这里部分代码省略.........
                        if (preventMsgGlobalUser)
                        {
                            try
                            {
                                string Querystring = "Select MsgFrom,MsgToId,MsgTo,MsgSubject,MsgBody From tb_ManageComposeMsg Where MsgToId = " + connId + "";
                                ds = DataBaseHandler.SelectQuery(Querystring, "tb_ManageComposeMsg");
                            }
                            catch (Exception ex)
                            {
                                Console.Write("error : " + ex.StackTrace);
                            }
                        }

                        try
                        {
                            string PostMessage = string.Empty;
                            string ResponseStatusMsg = string.Empty;

                           // Log("[ " + DateTime.Now + " ] => [ Message Sending Process Running.. ]");

                            if (ds.Tables.Count > 0)
                            {
                                if (ds.Tables[0].Rows.Count > 0)
                                {

                                    PostMessage = "";
                                    ResponseStatusMsg = "Already Sent";

                                }
                                else
                                {

                                    PostMessage = "senderEmail=" + FromemailId.Trim() + "&ccInput=&subject=" + Uri.EscapeDataString(msg.ToString()) + "&body=" + Uri.EscapeDataString(body.ToString()) + "&isReply=&isForward=&itemId=&recipients=" + Uri.EscapeUriString(connId) + "&recipientNames=" + Uri.EscapeUriString(Nstring) + "&groupId=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "&submit=Send+Message";
                                    ResponseStatusMsg = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/inbox/mailbox/message/send"), PostMessage, "https://www.linkedin.com/inbox/", "", "", "XMLHttpRequest", "https://www.linkedin.com", "1");   //ahmed sudi client changes
                                }
                            }
                            else
                            {
                                PostMessage = "senderEmail=" + FromemailId.Trim() + "&ccInput=&subject=" + Uri.EscapeDataString(msg.ToString()) + "&body=" + Uri.EscapeDataString(body.ToString()) + "&isReply=&isForward=&itemId=&recipients=" + Uri.EscapeUriString(connId) + "&recipientNames=" + Uri.EscapeUriString(Nstring) + "&groupId=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "&submit=Send+Message";
                                ResponseStatusMsg = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/inbox/mailbox/message/send"), PostMessage, "https://www.linkedin.com/inbox/", "", "", "XMLHttpRequest", "https://www.linkedin.com", "1");   //ahmed sudi client changes
                            }

                            if (ResponseStatusMsg.Contains("Your message was successfully sent.") || ResponseStatusMsg.Contains("Tu mensaje ha sido enviado con éxito."))
                            {
                                #region for newConnections only

                                try
                                {
                                    if (Globals.isnew_Connections_only)
                                    {
                                        string query_update = "update tb_New_Connections set status=1 where UserId=" + connId;
                                        DataBaseHandler.UpdateQuery(query_update, "tb_ComposeMessageExcelData");
                                    }
                                }
                                catch (Exception ex)
                                {
                                   // Log("[ " + DateTime.Now + " ] => [ Exception : " + ex + " ]");
                                }




                                #endregion


                                try
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:67,代码来源:ComposeMessage.cs

示例2: AddSpecificGroupUser


//.........这里部分代码省略.........
                            }
                            catch { }

                            try
                            {
                                if (NumberHelper.ValidateNumber(sikvalue))
                                {
                                    sikvalue = sikvalue.Split('\"')[0];
                                }
                                else
                                {
                                    sikvalue = sikvalue.Split('\"')[0];
                                }
                            }
                            catch
                            {
                                sikvalue = sikvalue.Split('\"')[0];
                            }

                            //if (pageSource.Contains("<p class=\"paginate\">"))
                            //{
                            //    pagination_url = Utils.getBetween(pageSource, "<p class=\"paginate\">", "</a>");
                            //    pagination_url = Utils.getBetween(pagination_url, "href=\"", "\">").Replace("amp;", "");
                            //    pagination_url = "https://www.linkedin.com" + pagination_url;
                            //}

                            if (!string.IsNullOrEmpty(sikvalue))
                            {

                                //string postdata = "csrfToken=" + csrfToken + "&searchField=" + SearchKeyword + "&searchMembers=submit&searchMembers=Search&gid=" + gid.Split(':')[2] + "&goback=.gna_" + gid.Split(':')[2] + "";
                                //pageSource = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/groups"), postdata, "http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[2] + "&sik=" + txid + "&split_page=" + i + "&goback=%2Egna_" + gid.Split(':')[2] + "", "", "");
                                #region Commented by sharan
                                string postdata = "csrfToken=" + csrfToken + "&searchField=" + SearchKeyword + "&searchMembers=submit&searchMembers=Search&gid=" + gid.Split(':')[1] + "&goback=.gna_" + gid.Split(':')[1] + "";
                                pageSource = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/groups"), postdata, "http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[1] + "&sik=" + txid + "&split_page=" + i + "&goback=%2Egna_" + gid.Split(':')[1] + "", "", "");
                                #endregion

                                #region written by sharan
                                pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/grp/members?csrfToken=" + csrfToken + "&search=" + SearchKeyword.Replace(" ", "+") + "&gid=" + gid.Split(':')[1]));
                                #endregion
                                //string postdata = "csrfToken=" + csrfToken + "&searchField=" + SearchKeyword + "&searchMembers=submit&searchMembers=Search&gid=" + gid.Split(':')[1] + "&goback=.gna_" + gid.Split(':')[1] + "";
                                //pageSource = HttpHelper.postFormDataRef(new Uri("http://www.linkedin.com/groups"), postdata, "http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[1] + "&sik=" + txid + "&split_page=" + i + "&goback=%2Egna_" + gid.Split(':')[1] + "", "", "");

                            }
                            else
                            {

                                pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/grp/members?csrfToken=" + csrfToken + "&search=" + SearchKeyword.Replace(" ", "+") + "&gid=" + gid.Split(':')[1]));

                                // pageSource = HttpHelper.getHtmlfromUrl(new Uri("https://www.linkedin.com/grp/members?csrfToken=" + csrfToken + "&search=" + SearchKeyword.Replace(" ", "+") + "&gid=" + gid.Split(':')[1]));

                            }
                        }

                        if (!string.IsNullOrEmpty(sikvalue))
                        {
                            if (counter > 1)
                            {


                                // string getdata = "http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[2] + "&sik=" + txid + "&split_page=" + i + "&goback=%2Egna_" + gid.Split(':')[2] + "";
                                string getdata = "http://www.linkedin.com/groups?viewMembers=&gid=" + gid.Split(':')[1] + "&sik=" + txid + "&split_page=" + i + "&goback=%2Egna_" + gid.Split(':')[1] + "";
                                string new_pagination_url = pagination_url;
                                new_pagination_url = Utils.getBetween("###" + new_pagination_url, "###", "page=");
                                new_pagination_url = new_pagination_url + "page=" + counter;
                                pageSource = HttpHelper.getHtmlfromUrl(new Uri(new_pagination_url));
                                //   pageSource = HttpHelper.getHtmlfromUrl(new Uri(getdata));
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:67,代码来源:MessageGroupMember.cs

示例3: PostFinalMsg_WithTag


//.........这里部分代码省略.........
                                    try
                                    {
                                        string Querystring = "Select MsgFrom,MsgToId,MsgTo,MsgSubject,MsgBody From tb_ManageComposeMsg Where MsgToId = " + connId + "";
                                        ds = DataBaseHandler.SelectQuery(Querystring, "tb_ManageComposeMsg");
                                    }
                                    catch (Exception ex)
                                    {
                                        Console.Write("error : " + ex.StackTrace);
                                    }
                                }

                                if (ds.Tables.Count > 0)
                                {
                                    if (ds.Tables[0].Rows.Count > 0)
                                    {

                                        PostMessage = "";
                                        ResponseStatusMsg = "Already Sent";

                                    }
                                    else
                                    {
                                        if (ds_bList.Tables.Count > 0 && ds_bList.Tables[0].Rows.Count > 0)
                                        {

                                            GlobusLogHelper.log.Info(" User: " + ContactName.Replace(":", string.Empty).Trim() + " is Added BlackListed List For Send Messages Pls Check ");
                                            ResponseStatusMsg = "BlackListed";
                                        }
                                        else
                                        {
                                            tempBody = tempBody.Replace("<Insert Name>", string.Empty).Replace("<Insert Group>", string.Empty).Replace("<Insert From Email>", string.Empty);

                                            PostMessage = "senderEmail=" + FromemailId.Trim() + "&ccInput=&subject=" + Uri.EscapeDataString(tempsubject.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&isReply=&isForward=&itemId=&recipients=" + Uri.EscapeUriString(connId) + "&recipientNames=" + Uri.EscapeUriString(Nstring) + "&groupId=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "&submit=Send+Message";
                                            ResponseStatusMsg = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/inbox/mailbox/message/send"), PostMessage, "https://www.linkedin.com/inbox/", "", "", "XMLHttpRequest", "https://www.linkedin.com", "1");   //ahmed sudi client changes
                                            //PostMessage = "csrfToken=" + csrfToken + "&subject=" + Uri.EscapeDataString(tempsubject.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&submit=Send+Message&fromName=" + FromEmailNam + "&fromEmail=" + FromemailId + "&connectionIds=" + connId + "&connectionNames=" + Uri.EscapeUriString(Nstring) + "&allowEditRcpts=true&addMoreRcpts=false&openSocialAppBodySuffix=&st=&viewerDestinationUrl=&goback=.smg_*1_*1_*1_*1_*1_*1_*1_*1_*1";   //commented for client ahmad sudi
                                            //ResponseStatusMsg = HttpHelper.postFormData(new Uri("http://www.linkedin.com/msgToConns"), PostMessage);
                                        }
                                    }
                                }
                                else
                                {
                                    if (ds_bList.Tables.Count > 0 && ds_bList.Tables[0].Rows.Count > 0)
                                    {

                                        GlobusLogHelper.log.Info(" User: " + ContactName.Replace(":", string.Empty).Trim() + " is Added BlackListed List For Send Messages Pls Check ]");
                                        ResponseStatusMsg = "BlackListed";
                                    }
                                    else
                                    {
                                        tempBody = tempBody.Replace("<Insert Name>", string.Empty).Replace("<Insert Group>", string.Empty).Replace("<Insert From Email>", string.Empty);
                                        PostMessage = "senderEmail=" + FromemailId.Trim() + "&ccInput=&subject=" + Uri.EscapeDataString(tempsubject.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&isReply=&isForward=&itemId=&recipients=" + Uri.EscapeUriString(connId) + "&recipientNames=" + Uri.EscapeUriString(Nstring) + "&groupId=&csrfToken=" + csrfToken + "&sourceAlias=" + sourceAlias + "&submit=Send+Message";
                                        ResponseStatusMsg = HttpHelper.postFormDataRef(new Uri("https://www.linkedin.com/inbox/mailbox/message/send"), PostMessage, "https://www.linkedin.com/inbox/", "", "", "XMLHttpRequest", "https://www.linkedin.com", "1");   //ahmed sudi client changes


                                        //PostMessage = "csrfToken=" + csrfToken + "&subject=" + Uri.EscapeDataString(tempsubject.ToString()) + "&body=" + Uri.EscapeDataString(tempBody.ToString()) + "&submit=Send+Message&fromName=" + FromEmailNam + "&fromEmail=" + FromemailId + "&connectionIds=" + connId + "&connectionNames=" + Uri.EscapeUriString(Nstring) + "&allowEditRcpts=true&addMoreRcpts=false&openSocialAppBodySuffix=&st=&viewerDestinationUrl=&goback=.smg_*1_*1_*1_*1_*1_*1_*1_*1_*1";
                                        //ResponseStatusMsg = HttpHelper.postFormData(new Uri("http://www.linkedin.com/msgToConns"), PostMessage);
                                    }
                                }

                                if ((ResponseStatusMsg.Contains("Your message was successfully sent.")) || (ResponseStatusMsg.Contains("Se ha enviado tu mensaje satisfactoriamente")) || (ResponseStatusMsg.Contains("Sua mensagem foi enviada")))
                                {
                                    GlobusLogHelper.log.Info(" Subject Posted : " + tempsubject.ToString());
                                    GlobusLogHelper.log.Info(" Body Text Posted : " + tempBody.ToString());
                                    GlobusLogHelper.log.Info(" Message posted to " + FullName );

                                    ReturnString = "Your message was successfully sent.";
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:67,代码来源:ComposeMessage.cs


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