I'm not really sure what you're trying to do but I think the purpose of your code is to check what kind of notifications are enabled and perform them accordingly. Assuming that the notification settings are on a per-user basis (as a setting for example) and not something that can be enabled/disabled application wide I would make the following changes:
Create a general INotification-interface and subclass from that interface
//depending on how different the messages are per type of notification
//you might only need one message
public interface INotification
{
public String NotificationMailMessage { get; };
public String NotificationPushMessage { get; };
//add more types here
}
//you might only need one concrete implementation, dependings on how complex the logic is
//using the INotification-interface gives you the flexibility to create specific
//notification classes for more complex notifications
public class SimpleNotification: INotification
{
//you could replace this with a general message and some parameters if applicable
public SimpleNotification(String mailMessage, String pushMessage)
{
NotificationMailMessage = mailMessage;
NotificationPushMessage = pushMessage;
}
//implement properties here
}
Something you could do is:
public class FavorAcceptedNotification : INotification
{
private String _firstName;
private String _lastName;
private String _reqMemberName;
public FavorAcceptedNotification(String firstName, String lastName, String reqMembername)
{
_firstName = firstName;
//and so on
}
public String NotificationMailMessage
{
get
{
return MsgSuccess.GetMsg(Successes.FBPostFavorAccept).Replace("{%RecMemberName%}", _firstName + " " + _lastName).Replace("{%ReqMemberName%}", "you");
}
}
}
Which means you simplify the switch to:
case FavorBAL.Favor.Accepted:
strTitle = "Accept";
var notification = new FavorAcceptedNotification(objMemberBAL.FirstName, objMemberBAL.LastName, Convert.ToString(dtblFavor.Rows[0]["ReqMemberName"]));
var notificationSettings = new NotificationSettings();
notificationSettings.Push(notification);
Your NotificationSettings class (might need to rename that one since it now does more then wrap settings) can deal with determining what notifications are enabled and what needs to be sent. Use Kane's suggestion to refactor with TryParseBool.
It all depends on what you're trying to achieve really.