// Token: 0x06000794 RID: 1940 RVA: 0x00034618 File Offset: 0x00032818 public static void Update(ExternalWebsite site) { using (SqlCommand textCommand = SqlHelper.GetTextCommand("UPDATE ExternalWebsites SET ShortTitle=@short, FullTitle=@full, URL=@url WHERE ExternalWebsiteID=@site")) { ExternalWebsitesDAL.AddParams(textCommand, site); SqlHelper.ExecuteNonQuery(textCommand); } ExternalWebsitesDAL.ClearMenuCache(); }
// Token: 0x06000792 RID: 1938 RVA: 0x00034570 File Offset: 0x00032770 public static void Delete(int id) { using (SqlCommand textCommand = SqlHelper.GetTextCommand("DELETE FROM ExternalWebsites WHERE ExternalWebsiteID=@site")) { textCommand.Parameters.AddWithValue("site", id); SqlHelper.ExecuteNonQuery(textCommand); } ExternalWebsitesDAL.ClearMenuCache(); }
// Token: 0x06000793 RID: 1939 RVA: 0x000345C8 File Offset: 0x000327C8 public static int Insert(ExternalWebsite site) { int result; using (SqlCommand textCommand = SqlHelper.GetTextCommand("INSERT ExternalWebsites (ShortTitle, FullTitle, URL) VALUES (@short, @full, @url)\nSELECT scope_identity()")) { ExternalWebsitesDAL.AddParams(textCommand, site); result = Convert.ToInt32(SqlHelper.ExecuteScalar(textCommand)); } ExternalWebsitesDAL.ClearMenuCache(); return(result); }