public JsonObject SaveSubscriber(string subscriberEmail, string subscriberMessage, bool subscriberIsDeleted, long subscriberId) { var retMessage = new JsonObject(); bool valid = UtilsSecurity.IsValidEmail(DecodeUrl(subscriberEmail)); if (valid == true) { string message; long retSubscriberID = DataInfoList.SaveLtdSubscriber(DecodeUrl(subscriberEmail), DecodeUrl(subscriberMessage), subscriberIsDeleted, subscriberId, out message); if ((retSubscriberID > 0) && (message.Trim().Length == 0)) { retMessage.Put("message", subscriberId == 0 ? "Successfully Added Subscriber" : "Successfully Updated Subscriber"); } else { if (message.Trim().Length == 0) { message = "Error in Saving Subscriber. Return Subscriber ID is 0"; } retMessage.Put("error", message); } } else { retMessage.Put("error", "Please enter a Valid Email to Subscribe"); } return(retMessage); }