Example #1
0
 public DataTable Messages_Sent(MessagesBase messageBase)
 {
     dtContainer = new DataTable();
     dsContainer = new DataSet();
     try
     {
         MyParameter[] myParams =
         {
             new MyParameter("@MessageID",   messageBase.MessageID),
             new MyParameter("@MessageText", messageBase.MessageText),
             new MyParameter("@Description", messageBase.Description),
             new MyParameter("@DateSent",    messageBase.DateSent),
             new MyParameter("@UserID",      messageBase.UserID),
             new MyParameter("@SenderID",    messageBase.SenderID),
             new MyParameter("@SentToSelf",  messageBase.SentToSelf),
             new MyParameter("@Draft",       messageBase.Draft)
         };
         Common.Set_Procedures("Message_Sent");
         Common.Set_ParameterLength(myParams.Length);
         Common.Set_Parameters(myParams);
         dtContainer = Common.Execute_Procedures_LoadData();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(dtContainer);
 }
Example #2
0
 /// <summary>Creates service definition that can be registered with a server</summary>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static grpc::ServerServiceDefinition BindService(MessagesBase serviceImpl)
 {
     return(grpc::ServerServiceDefinition.CreateBuilder()
            .AddMethod(__Method_CreateMessage, serviceImpl.CreateMessage)
            .AddMethod(__Method_GetMessage, serviceImpl.GetMessage)
            .AddMethod(__Method_ListMessages, serviceImpl.ListMessages).Build());
 }
Example #3
0
 public ActionResult Messages_Sent(MessagesBase messageBase)
 {
     actionResult = new ActionResult();
     try
     {
         actionResult.dtResult = messageDL.Messages_Sent(messageBase);
         if (actionResult.dtResult != null && actionResult.dtResult.Rows.Count > 0)
         {
             actionResult.IsSuccess = true;
         }
     }
     catch (Exception ex)
     {
     }
     return(actionResult);
 }
Example #4
0
 public ActionResult Message_LoadByID(MessagesBase message)
 {
     actionResult = new ActionResult();
     try
     {
         actionResult.dtResult = messageDL.Message_LoadById(message);
         if (actionResult.dtResult != null && actionResult.dtResult.Rows.Count > 0)
         {
             actionResult.IsSuccess = true;
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(actionResult);
 }
Example #5
0
 public DataTable Messages_Delete(MessagesBase messages)
 {
     dtContainer = new DataTable();
     dsContainer = new DataSet();
     try
     {
         MyParameter[] myParams =
         {
             new MyParameter("@MessageID", messages.MessageID)
         };
         Common.Set_Procedures("Message_Delete");
         Common.Set_ParameterLength(myParams.Length);
         Common.Set_Parameters(myParams);
         dtContainer = Common.Execute_Procedures_LoadData();
     }
     catch (Exception ex)
     {
         throw ex;
     }
     return(dtContainer);
 }
Example #6
0
 public UpdatesHandler()
 {
     _messagesBase = new MessagesBase();
     _messagesBase.Deserialize();
 }
Example #7
0
 /// <summary>Register service method with a service binder with or without implementation. Useful when customizing the  service binding logic.
 /// Note: this method is part of an experimental API that can change or be removed without any prior notice.</summary>
 /// <param name="serviceBinder">Service methods will be bound by calling <c>AddMethod</c> on this object.</param>
 /// <param name="serviceImpl">An object implementing the server-side handling logic.</param>
 public static void BindService(grpc::ServiceBinderBase serviceBinder, MessagesBase serviceImpl)
 {
     serviceBinder.AddMethod(__Method_CreateMessage, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Enfonica.Messaging.V1.CreateMessageRequest, global::Enfonica.Messaging.V1.Message>(serviceImpl.CreateMessage));
     serviceBinder.AddMethod(__Method_GetMessage, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Enfonica.Messaging.V1.GetMessageRequest, global::Enfonica.Messaging.V1.Message>(serviceImpl.GetMessage));
     serviceBinder.AddMethod(__Method_ListMessages, serviceImpl == null ? null : new grpc::UnaryServerMethod <global::Enfonica.Messaging.V1.ListMessagesRequest, global::Enfonica.Messaging.V1.ListMessagesResponse>(serviceImpl.ListMessages));
 }