Beispiel #1
0
 public WebinarAudience getWebinarAudience(int webinarID)
 {
     WebinarAudience objWebinarAudience = new WebinarAudience();
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             using (MySqlCommand sqlCmd = new MySqlCommand(DBQuery.sqlWebinarAudiSelect, sqlCon))
             {
                 sqlCon.Open();
                 sqlCmd.CommandType = CommandType.Text;
                 sqlCmd.Parameters.Add(new MySqlParameter("@webinarID", webinarID));
                 MySqlDataReader reader = sqlCmd.ExecuteReader();
                 if (reader.HasRows)
                 {
                     while (reader.Read())
                     {
                         objWebinarAudience.WebinarID = webinarID;
                         objWebinarAudience.AudienceViewBgColor = reader["audiBgColor"] == DBNull.Value ? string.Empty : Convert.ToString(reader["audiBgColor"]);
                         objWebinarAudience.AudienceViewBgImageID = reader["audiBgImageID"] == DBNull.Value ? -1 : Convert.ToInt32(reader["audiBgImageID"]);
                         objWebinarAudience.AudienceViewBackground = reader["audiBackGround"] == DBNull.Value ? string.Empty : Convert.ToString(reader["audiBackGround"]);
                         objWebinarAudience.Email = reader["Email"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Email"]);
                         objWebinarAudience.Chat = reader["Chat"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Chat"]);
                         objWebinarAudience.Content = reader["Content"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Content"]);
                         objWebinarAudience.Download = reader["Download"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Download"]);
                         objWebinarAudience.FaceBook = reader["FaceBook"] == DBNull.Value ? 0 : Convert.ToInt32(reader["FaceBook"]);
                         objWebinarAudience.LinkedIn = reader["LinkedIn"] == DBNull.Value ? 0 : Convert.ToInt32(reader["LinkedIn"]);
                         objWebinarAudience.Search = reader["Search"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Search"]);
                         objWebinarAudience.SpeakerBio = reader["SpeakerBio"] == DBNull.Value ? 0 : Convert.ToInt32(reader["SpeakerBio"]);
                         objWebinarAudience.SubmitQuestion = reader["SubmitQuestion"] == DBNull.Value ? 0 : Convert.ToInt32(reader["SubmitQuestion"]);
                         objWebinarAudience.Twitter = reader["Twitter"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Twitter"]);
                         objWebinarAudience.Video = reader["Video"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Video"]);
                         objWebinarAudience.Wiki = reader["Wiki"] == DBNull.Value ? 0 : Convert.ToInt32(reader["Wiki"]);
                     }
                 }
                 reader.Close();
                 reader = null;
             }
             sqlCon.Close();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
     return objWebinarAudience;
 }
Beispiel #2
0
 public void SaveWebinarAudience(WebinarAudience objWebinarAudience)
 {
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand(DBQuery.sqlWebinarAudiComponentUpdate, sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.Text;
             sqlCmd.Parameters.Add(new MySqlParameter("@audiBackGround", objWebinarAudience.AudienceViewBackground));
             sqlCmd.Parameters.Add(new MySqlParameter("@Download", objWebinarAudience.Download));
             sqlCmd.Parameters.Add(new MySqlParameter("@chat", objWebinarAudience.Chat));
             sqlCmd.Parameters.Add(new MySqlParameter("@submitQuestion", objWebinarAudience.SubmitQuestion));
             sqlCmd.Parameters.Add(new MySqlParameter("@Wiki", objWebinarAudience.Wiki));
             sqlCmd.Parameters.Add(new MySqlParameter("@Email", objWebinarAudience.Email));
             sqlCmd.Parameters.Add(new MySqlParameter("@webinarID", objWebinarAudience.WebinarID));
             sqlCmd.ExecuteNonQuery();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
 public void saveAudienceComponent()
 {
     WebinarAudience objWebinarAudience = new WebinarAudience();
     if (hSelBgID.Value != "")
         objWebinarAudience.AudienceViewBackground = hSelBgID.Value;
     else
         objWebinarAudience.AudienceViewBackground = "None";
     objWebinarAudience.Download = getCheckFeatureID(Convert.ToInt32(ClientConfigMaster.Audi_Component_Download_Slides));
     objWebinarAudience.Chat = getCheckFeatureID(Convert.ToInt32(ClientConfigMaster.Audi_Component_Group_Chat));
     objWebinarAudience.SubmitQuestion = getCheckFeatureID(Convert.ToInt32(ClientConfigMaster.Audi_Component_Submit_Question));
     objWebinarAudience.Wiki = getCheckFeatureID(Convert.ToInt32(ClientConfigMaster.Audi_Component_Wikipedia));
     objWebinarAudience.Email = getCheckFeatureID(Convert.ToInt32(ClientConfigMaster.Audi_Component_EmailFriend));
     objWebinarAudience.WebinarID = Convert.ToInt32(hWebinarID.Value);
     objWebinarDA.SaveWebinarAudience(objWebinarAudience);
     getAudBackGround1();
 }