Example #1
0
 public void SaveRegistrantUpdate(RegistrantUpdateBO objRegistrantUpdateBO)
 {
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             MySqlCommand sqlCmd = new MySqlCommand("spSaveRegistrantUpdate", sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.StoredProcedure;
             sqlCmd.Parameters.Add(new MySqlParameter("pIsRegularUpdate", objRegistrantUpdateBO.IsRegularUpdate));
             sqlCmd.Parameters.Add(new MySqlParameter("pUpdateWeekday", objRegistrantUpdateBO.UpdateWeekday));
             sqlCmd.Parameters.Add(new MySqlParameter("pUpdateTime", objRegistrantUpdateBO.UpdateTime));
             sqlCmd.Parameters.Add(new MySqlParameter("pIsUpdateWhenReg", objRegistrantUpdateBO.IsUpdateWhenRegister));
             sqlCmd.Parameters.Add(new MySqlParameter("pUpdateToEmails", objRegistrantUpdateBO.updateToEmails));
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objRegistrantUpdateBO.WebinarID));
             sqlCmd.ExecuteNonQuery();
             sqlCon.Close();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }
Example #2
0
        private void setNotificationDefaults(int webinarID)
        {
            #region email contents
            WebinarNotification objWebNotify = new WebinarNotification();
            objWebNotify.WebinarID = webinarID;
            objWebNotify.isConfirmEmailAllReg = true;
            objWebNotify.RegConfirmEmailContentID = Convert.ToInt32(Constant.RegConfirmContentID);
            objWebNotify.ReminderEmailContentID = Convert.ToInt32(Constant.ReminderContentID);
            objWebNotify.FollowupAEmailContentID = Convert.ToInt32(Constant.AttendeeFollowUpContentID);
            objWebNotify.FollowupNAEmailContentID = Convert.ToInt32(Constant.NonAttendeeFollowUpContentID);
            objWebNotify.InvitationContentID = Convert.ToInt32(Constant.InvitationContentID);
            objWebinarDA.SaveWebinarNotificationDefault(objWebNotify);
            #endregion

            #region Registrant Updates
            EmailDA objEmailDA = new EmailDA();
            RegistrantUpdateBO objRegistrantUpdateBO = new RegistrantUpdateBO();
            objRegistrantUpdateBO.WebinarID = webinarID;
            objRegistrantUpdateBO.IsRegularUpdate = true;
            objRegistrantUpdateBO.IsUpdateWhenRegister = true;
            objRegistrantUpdateBO.UpdateTime = "08:00:00";
            objRegistrantUpdateBO.updateToEmails = Session["EmailID"].ToString();
            objRegistrantUpdateBO.UpdateWeekday = 2;
            objEmailDA.SaveRegistrantUpdate(objRegistrantUpdateBO);
            #endregion

            // Reminder email setting
            RegistrantEmailSettingBO objEmailSetting = new RegistrantEmailSettingBO();

            #region Hour reminder
            objEmailSetting.intervalType = "H";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Day reminder
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Week reminder
            objEmailSetting.intervalType = "W";
            objEmailSetting.intervalValue = 1;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Reminder Email";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Follow-up - Attendees
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Follow-up Email - Attended";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion

            #region Follow-up - Non-Attendees
            objEmailSetting.intervalType = "D";
            objEmailSetting.intervalValue = 2;
            objEmailSetting.EmailScheduleStatus = "Draft";
            objEmailSetting.SettingType = "Follow-up Email - Unattended";
            objEmailSetting.setID = 0;
            objEmailSetting.webinarID = webinarID;
            objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
            #endregion
        }
Example #3
0
 public string SaveWebEmail()
 {
     RegistrantEmailSettingBO objEmailSetting = new RegistrantEmailSettingBO();
     // Reminder Email
     if (chkRem1.Checked)
     {
         objEmailSetting.intervalType = "M"; //ddRem1Type.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddRem1Value.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Reminder Email";
         objEmailSetting.setID = Convert.ToInt32(hRem1.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     if (chkRem2.Checked)
     {
         objEmailSetting.intervalType = ddRem2Type.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddRem2Value.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Reminder Email";
         objEmailSetting.setID = Convert.ToInt32(hRem2.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     if (chkRem3.Checked)
     {
         objEmailSetting.intervalType = ddRem3Type.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddRem3Value.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Reminder Email";
         objEmailSetting.setID = Convert.ToInt32(hRem3.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     if (chkRem4.Checked)
     {
         objEmailSetting.intervalType = ddRem4Type.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddRem4Value.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Reminder Email";
         objEmailSetting.setID = Convert.ToInt32(hRem4.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     if (chkRem5.Checked)
     {
         objEmailSetting.intervalType = ddRem5Type.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddRem5Value.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Reminder Email";
         objEmailSetting.setID = Convert.ToInt32(hRem5.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     // Follow-up Email - attend
     if (chkFollowAttendee.Checked)
     {
         objEmailSetting.intervalType = ddFollowAttendType.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddFollowAttendValue.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Follow-up Email - Attended";
         objEmailSetting.setID = Convert.ToInt32(hFollowAttendee.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     // Follow-up Email - unattended
     if (chkFollowNonAttendee.Checked)
     {
         objEmailSetting.intervalType = ddFollowNonAttendType.SelectedValue;
         objEmailSetting.intervalValue = Convert.ToInt16(ddFollowNonAttendValue.SelectedValue);
         objEmailSetting.EmailScheduleStatus = "Draft";
         objEmailSetting.SettingType = "Follow-up Email - Unattended";
         objEmailSetting.setID = Convert.ToInt32(hFollowNonAttendee.Value);
         objEmailSetting.webinarID = Convert.ToInt32(hWebinarID.Value);
         objEmailDA.SaveRegistrantEmailSetting(objEmailSetting);
     }
     // Registrant Updates
     string rtnVal = string.Empty;
     if (chkEmailRegularUpdate.Checked || chkEmailWhenRegistered.Checked)
     {
         if (txtEmailRegularToRedirect.Text.Trim() == "")
             rtnVal = "Email addressing to notify the registration";
         else
         {
             EBirdUtility objUtil = new EBirdUtility();
             rtnVal = objUtil.getInvalidEmails(txtEmailRegularToRedirect.Text.Trim(), new char[] { ';' });
         }
     }
     if (rtnVal != string.Empty)
     {
         RegistrantUpdateBO objRegistrantUpdateBO = new RegistrantUpdateBO();
         objRegistrantUpdateBO.WebinarID = Convert.ToInt32(hWebinarID.Value);
         objRegistrantUpdateBO.IsRegularUpdate = chkEmailRegularUpdate.Checked;
         objRegistrantUpdateBO.IsUpdateWhenRegister = chkEmailWhenRegistered.Checked;
         objRegistrantUpdateBO.UpdateTime = Convert.ToDateTime(rtEmailRegularTime.SelectedDate).ToString("HH:mm", CultureInfo.CurrentCulture);
         objRegistrantUpdateBO.updateToEmails = txtEmailRegularToRedirect.Text;
         objRegistrantUpdateBO.UpdateWeekday = Convert.ToInt32(ddEmailRegularDay.SelectedValue);
         objEmailDA.SaveRegistrantUpdate(objRegistrantUpdateBO);
     }
     return rtnVal;
 }