Esempio n. 1
0
 public static void AddBreakMessage(BreakMessage breakMessage)
 {
     breakMessage.ID = SQLDataAccess.ExecuteScalar<int>("INSERT INTO [dbo].[BreakMessage] ([MessageID], [Name], [Email]) VALUES (@MessageID, @Name, @Email); SELECT SCOPE_IDENTITY();",
                                            CommandType.Text,
                                            new SqlParameter("@MessageID", breakMessage.MessageID),
                                            new SqlParameter("@Name", breakMessage.Name),
                                            new SqlParameter("@Email", breakMessage.Email)
                                            );
 }
Esempio n. 2
0
 public static void AddBreakMessage(BreakMessage breakMessage)
 {
     breakMessage.ID = SQLDataAccess.ExecuteScalar <int>("INSERT INTO [dbo].[BreakMessage] ([MessageID], [Name], [Email]) VALUES (@MessageID, @Name, @Email); SELECT SCOPE_IDENTITY();",
                                                         CommandType.Text,
                                                         new SqlParameter("@MessageID", breakMessage.MessageID),
                                                         new SqlParameter("@Name", breakMessage.Name),
                                                         new SqlParameter("@Email", breakMessage.Email)
                                                         );
 }
Esempio n. 3
0
 public static void UpdateBreakMessage(BreakMessage breakMessage)
 {
     SQLDataAccess.ExecuteNonQuery("UPDATE [dbo].[BreakMessage] SET MessageID = @MessageID, Name = @Name, Email = @Email WHERE ID = @ID",
                                   CommandType.Text,
                                   new SqlParameter("@MessageID", breakMessage.MessageID),
                                   new SqlParameter("@Name", breakMessage.Name),
                                   new SqlParameter("@Email", breakMessage.Email),
                                   new SqlParameter("@ID", breakMessage.ID)
                                   );
 }
Esempio n. 4
0
 public static void UpdateBreakMessage(BreakMessage breakMessage)
 {
     SQLDataAccess.ExecuteNonQuery("UPDATE [dbo].[BreakMessage] SET MessageID = @MessageID, Name = @Name, Email = @Email WHERE ID = @ID",
                                     CommandType.Text,
                                     new SqlParameter("@MessageID", breakMessage.MessageID),
                                     new SqlParameter("@Name", breakMessage.Name),
                                     new SqlParameter("@Email", breakMessage.Email),
                                     new SqlParameter("@ID", breakMessage.ID)
                                     );
 }