Beispiel #1
0
        public void UpdateWebinarRegStatus(bool regStatus, int webinarID, int updatedBy)
        {
            try
            {
                using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
                {
                    MySqlCommand sqlCmd = new MySqlCommand(DBQuery.sqlWebinarRegStatusUpdate, sqlCon);
                    sqlCon.Open();
                    sqlCmd.CommandType = CommandType.Text;
                    sqlCmd.Parameters.Add(new MySqlParameter("@isRegEnabled", regStatus));
                    sqlCmd.Parameters.Add(new MySqlParameter("@webinarID", webinarID));
                    sqlCmd.ExecuteNonQuery();

                    WebinarAuditLog objWebinarAuditLog = new WebinarAuditLog();
                    objWebinarAuditLog.ActionByID = updatedBy;
                    objWebinarAuditLog.WebinarAction = "Status Change";
                    objWebinarAuditLog.ActionDetails = "Status updated to " + regStatus.ToString();
                    objWebinarAuditLog.WebinarID = webinarID;
                    sqlCon.Close();
                    RecordWebinarAction(objWebinarAuditLog);
                }
            }
            catch (Exception ex)
            {
                throw;
            }
        }
Beispiel #2
0
 public void RecordWebinarAction(WebinarAuditLog objWebinarAuditLog)
 {
     try
     {
         using (MySqlConnection sqlCon = new MySqlConnection(Constant.EBirdConnectionString))
         {
             //MySqlCommand sqlCmd = new MySqlCommand(DBQuery.sqlWebinarAuditInsert, sqlCon);
             MySqlCommand sqlCmd = new MySqlCommand("spAddWebinarLogs", sqlCon);
             sqlCon.Open();
             sqlCmd.CommandType = CommandType.StoredProcedure;
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarID", objWebinarAuditLog.WebinarID));
             sqlCmd.Parameters.Add(new MySqlParameter("pWebinarAction", objWebinarAuditLog.WebinarAction));
             sqlCmd.Parameters.Add(new MySqlParameter("pActionDetail", objWebinarAuditLog.ActionDetails));
             sqlCmd.Parameters.Add(new MySqlParameter("pActionby", objWebinarAuditLog.ActionByID));
             sqlCmd.ExecuteNonQuery();
         }
     }
     catch (Exception ex)
     {
         throw;
     }
 }