public SystemNotificationEntity GetNotificationByMessageId(int MessageId) { SystemNotificationEntity results = new SystemNotificationEntity(); results = rep.GetNotificationByMessageId(MessageId); return(results); }
internal string InsertUpdateSystemNotification(SystemNotificationEntity objNotification) { string result = string.Empty; try { StoredProcedureEntity sproc = new StoredProcedureEntity(); sproc.StoredProcedureName = "mapp.InsertUpdateSystemNotification"; if (objNotification.MessageId > 0) { sproc.StoredProceduresParameter.Add(GetParam("@MessageId", objNotification.MessageId.ToString().Trim(), SQLServerDatatype.IntDataType)); } sproc.StoredProceduresParameter.Add(GetParam("@Message", objNotification.Message.ToString().Trim(), SQLServerDatatype.VarcharDataType)); sproc.StoredProceduresParameter.Add(GetParam("@StartDateTime", objNotification.StartDateTime.ToString().Trim(), SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@EndDateTime", objNotification.EndDateTime.ToString().Trim(), SQLServerDatatype.DateTimeDataType)); sproc.StoredProceduresParameter.Add(GetParam("@FontColor", objNotification.FontColor.ToString().Trim(), SQLServerDatatype.VarcharDataType)); //sproc.StoredProceduresParameter.Add(GetParam("@IsActive", objNotification.IsActive.ToString().Trim(), SQLServerDatatype.BitDataType)); sql.ExecuteNoReturn(CommandType.StoredProcedure, sproc); } catch (Exception ex) { result = ex.Message; } return(result); }
public string InsertUpdateSystemNotification(SystemNotificationEntity objNotification) { return(rep.InsertUpdateSystemNotification(objNotification)); }