public static bool UpdateCounselingStatus(int counselingID, bool processed) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_UpdateCounselingStatus"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@CounselingID"; dbParam.Value = counselingID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@Processed"; dbParam.Value = processed; dbParam.DbType = DbType.Boolean; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); int result = -1; try { result = BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } return(result != -1); }
public static bool DeleteNews(int newsID) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_DeleteNews"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@NewsID"; dbParam.Value = newsID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); int result = -1; try { result = BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } return(result != -1); }
public static bool UpdateCaseFileName(int caseID, string caseFileName) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_UpdateCaseFileName"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@CaseID"; dbParam.Value = caseID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@CaseFileName"; dbParam.Value = caseFileName; dbParam.DbType = DbType.String; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); int result = -1; try { result = BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } return(result != -1); }
public static bool AddContentToCategory(int contentID, int categoryID) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_AddContentToCategory"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@ContentID"; dbParam.Value = contentID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@CategoryID"; dbParam.Value = categoryID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); int result = -1; try { result = BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } return(result != -1); }
public static bool UpdateSectionDetails(int sectionID, string sectionName, bool sectionAvailable, string sectionDesc, int sectionorder) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_UpdateSection"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@SectionName"; dbParam.Value = sectionName; dbParam.Size = 125; dbParam.DbType = DbType.String; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@SectionDesc"; dbParam.Value = sectionDesc; dbParam.Size = 255; dbParam.DbType = DbType.String; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@SectionAvailable"; dbParam.Value = sectionAvailable; dbParam.DbType = DbType.Boolean; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@SectionID"; dbParam.Value = sectionID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@sectionorder"; dbParam.Value = sectionorder; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); int result = -1; try { result = BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } return(result != -1); }
public static void DeleteMember(string memberID) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_Admin_Members_DeleteMember"; DbParameter param = dbComm.CreateParameter(); param.ParameterName = "@MemberID"; param.Value = memberID; param.DbType = DbType.String; dbComm.Parameters.Add(param); try { BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } }
public static void DeleteCategory(int categoryID) { DbCommand dbComm = BaseDB.CreateCommand(); dbComm.CommandText = "E_DeleteCategory"; DbParameter dbParam = dbComm.CreateParameter(); dbParam.ParameterName = "@CategoryID"; dbParam.Value = categoryID; dbParam.DbType = DbType.Int32; dbParam.Direction = ParameterDirection.Input; dbComm.Parameters.Add(dbParam); try { BaseDB.ExecuteNonQuery(dbComm); } catch (Exception exc) { throw exc; } }
internal static void UpdateLicense(string licenseData) { BaseDB.ExecuteNonQuery("spLicensingUpdate", "dsc_licensing", licenseData); }