protected void btnSave_Click(object sender, EventArgs e) { //if (Request["flg"].ToString() == "1") //{ WebinarSearchSettings objWebinarSearchSettings = new WebinarSearchSettings(); objWebinarSearchSettings.WebinarID = Convert.ToInt32(hWebinarID.Value); objWebinarSearchSettings.isGoogle = chkSearchG.Checked; objWebinarSearchSettings.isBing = chkSearchB.Checked; objWebinarSearchSettings.isYahoo = chkSearchY.Checked; objWebinarDA.saveWebinarSearchSettings(objWebinarSearchSettings); //objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "Search", (Convert.ToInt32(ClientConfigMaster.Audi_Component_Search)).ToString()); //if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); } //} //else //{ // objWebinarDA.SaveWebinarAudience(Convert.ToInt32(hWebinarID.Value), "Search", "0"); // //if (!ClientScript.IsStartupScriptRegistered("alert")) { Page.ClientScript.RegisterStartupScript(this.GetType(), "alert", "CloseAndReload();", true); } //} Session["Web_Tab"] = "3"; hModalStatusFlg.Value = "1"; }
public void saveWebinarSearchSettings(WebinarSearchSettings objWebinarSearchSettings) { //string sql1; //List<WebinarSearchSettings> objWebSearchSettings = getWebinarSearchSettings(objWebinarSearchSettings.WebinarID); //if (objWebSearchSettings.Count > 0) // sql1 = DBQuery.sqlWebinarSearchSettingUpdate; //else // sql1 = DBQuery.sqlWebinarSearchSettingInsert; try { using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString)) { MySqlCommand sqlCmd = new MySqlCommand("spUpdateSearchSettings", sqlCon); sqlCon.Open(); sqlCmd.CommandType = CommandType.StoredProcedure; sqlCmd.Parameters.Add(new MySqlParameter("pIsYahoo", objWebinarSearchSettings.isYahoo)); sqlCmd.Parameters.Add(new MySqlParameter("pIsBing", objWebinarSearchSettings.isBing)); sqlCmd.Parameters.Add(new MySqlParameter("pIsGoogle", objWebinarSearchSettings.isGoogle)); sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objWebinarSearchSettings.WebinarID)); sqlCmd.ExecuteNonQuery(); } } catch (Exception ex) { throw; } }