protected void btnSave_Click(object sender, EventArgs e)
        {
            int MsgCount = 0;
            int intValue = 0;

            if (txtMsgCount.Text.Trim() != "")
                MsgCount = Convert.ToInt32(txtMsgCount.Text);
            if (txtMinUpdates.Text.Trim() != "")
                intValue = Convert.ToInt32(txtMinUpdates.Text);

            LinkedInSettingBO objLI = new LinkedInSettingBO();

            //defaultInviteSubject,defaultInviteMessage,isNetworkUpdate,isInvitation,webinarID
            objLI.isLikeUnlike = chkLike.Checked;
            objLI.isComments = chkComments.Checked;
            objLI.isSearch = chkSearch.Checked;
            objLI.isFilterNetwork = chkNetwork.Checked;
            objLI.checkInterval = intValue;
            objLI.messageReturn = MsgCount;
            objLI.defaultInviteSubject = txtInviteSub.Text;
            objLI.defaultInviteMessage = txtInviteMsg.Text;
            objLI.isNetworkUpdate = chkAllowNetwork.Checked;
            objLI.isInvitation = chkAllowInvitation.Checked;
            objLI.WebinarID = Convert.ToInt32(hWebinarID.Value);
            if (Request["flg"].ToString() == "1")
                objSocialMediaDA.SaveLinkedInSettingDA(objLI, false);
            else
                objSocialMediaDA.SaveLinkedInSettingDA(objLI, true);

            //objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "LinkedIn", (Convert.ToInt32(ClientConfigMaster.Audi_Component_LinkedIn)).ToString());
            //if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); }
            //}
            //else
            //{
            //    objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "LinkedIn", "0");
            //    //if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); }
            //}
            Session["Web_Tab"] = "3";
            hModalStatusFlg.Value = "1";
        }
Esempio n. 2
0
 public void SaveLinkedInSettingDA(LinkedInSettingBO objLinkedInSettingBO, bool isCancel)
 {
     //string sql1;
     //List<LinkedInSettingBO> objLISettingBO = GetLinkedInSettingDA(objLinkedInSettingBO.WebinarID);
     //if (objLISettingBO.Count > 0)
     //    sql1 = SocialMediaQuery.sqlLISettingUpdate;
     //else
     //    sql1 = SocialMediaQuery.sqlLISettingInsert;
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand("spUpdateLinkedInSettings", sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.StoredProcedure;
             sqlCmd.Parameters.Add(new MySqlParameter("pIsLikeUnlike", objLinkedInSettingBO.isLikeUnlike));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsComments", objLinkedInSettingBO.isComments));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsSearch", objLinkedInSettingBO.isSearch));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsFilterNetwork", objLinkedInSettingBO.isFilterNetwork));
             sqlCmd.Parameters.Add(new MySqlParameter("pCheckInterval", objLinkedInSettingBO.checkInterval));
             sqlCmd.Parameters.Add(new MySqlParameter("pMessageReturn", objLinkedInSettingBO.messageReturn));
             sqlCmd.Parameters.Add(new MySqlParameter("pDefaultInviteSubject", objLinkedInSettingBO.defaultInviteSubject));
             sqlCmd.Parameters.Add(new MySqlParameter("pDefaultInviteMessage", objLinkedInSettingBO.defaultInviteMessage));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsNetworkUpdate", objLinkedInSettingBO.isNetworkUpdate));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsInvitation", objLinkedInSettingBO.isInvitation));
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objLinkedInSettingBO.WebinarID));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsCancel", isCancel));
             sqlCmd.ExecuteNonQuery();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }