protected void btnSave_Click(object sender, EventArgs e)
 {
     TwitterSettingBO objTW = new TwitterSettingBO();
     objTW.dispFromAcct = rcmbAcct.SelectedValue;
     objTW.headerTitle = txtHeaderTitle.Text;
     objTW.tweetHashtags = txtHashTag.Text;
     objTW.dispFromAcct = txtDisplayAcct.Text;
     objTW.filterKeywords = txtDisplayKeywords.Text;
     objTW.isUserTweet = chkUserTweet.Checked;
     objTW.userHashtags = txtEndUseHashtag.Text;
     objTW.userTextURL = txtEndUseURL.Text;
     objTW.WebinarID = Convert.ToInt32(hWebinarID.Value);
     if (Request["flg"].ToString() == "1")
         objSocialMediaDA.SaveTwitterSettingDA(objTW, false);
     else
         objSocialMediaDA.SaveTwitterSettingDA(objTW, true);
         //objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "Twitter", (Convert.ToInt32(ClientConfigMaster.Audi_Component_Twitter)).ToString());
        // if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); }
     //}
     //else
     //{
     //    objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "Twitter", "0");
     //   // if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); }
     //}
     Session["Web_Tab"] = "3";
     hModalStatusFlg.Value = "1";
 }
示例#2
0
 public void SaveTwitterSettingDA(TwitterSettingBO objTwitterSettingBO, bool isCancel)
 {
     //string sql1;
     //List<TwitterSettingBO> objTWSettingBO = GetTwitterSettingDA(objTwitterSettingBO.WebinarID);
     //if (objTWSettingBO.Count > 0)
     //    sql1 = SocialMediaQuery.sqlTWSettingUpdate;
     //else
     //    sql1 = SocialMediaQuery.sqlTWSettingInsert;
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand("spUpdateTwitterSettings", sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.StoredProcedure;
             sqlCmd.Parameters.Add(new MySqlParameter("pTwitterAcct", objTwitterSettingBO.twitterAcct));
             sqlCmd.Parameters.Add(new MySqlParameter("pHeaderTitle", objTwitterSettingBO.headerTitle));
             sqlCmd.Parameters.Add(new MySqlParameter("pTweetHashtags", objTwitterSettingBO.tweetHashtags));
             sqlCmd.Parameters.Add(new MySqlParameter("pDispFromAcct", objTwitterSettingBO.dispFromAcct));
             sqlCmd.Parameters.Add(new MySqlParameter("pFilterKeywords", objTwitterSettingBO.filterKeywords));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsUserTweet", objTwitterSettingBO.isUserTweet));
             sqlCmd.Parameters.Add(new MySqlParameter("pUserHashtags", objTwitterSettingBO.userHashtags));
             sqlCmd.Parameters.Add(new MySqlParameter("pUserTextURL", objTwitterSettingBO.userTextURL));
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objTwitterSettingBO.WebinarID));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsCancel", isCancel));
             sqlCmd.ExecuteNonQuery();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }