Example #1
0
        internal LateMessage MsgParser(IDataReader Reader)
        {
            LateMessage tmp = new LateMessage { };
            tmp.FromUid = (int)Reader["msg_from"];
            tmp.id = (int)Reader["id"];
            tmp.ToUid = (int)Reader["msg_for"];
            tmp.Message = (string)Reader["msg"];
            tmp.pm = (bool)Reader["pm"];
            tmp.Sent = (bool)Reader["sent"];
            tmp.MessageTime = (DateTime)Reader["msg_time"];

            return tmp;
        }
Example #2
0
        internal LateMessage MsgParser(IDataReader Reader)
        {
            LateMessage tmp = new LateMessage {
            };

            tmp.FromUid     = (int)Reader["msg_from"];
            tmp.id          = (int)Reader["id"];
            tmp.ToUid       = (int)Reader["msg_for"];
            tmp.Message     = (string)Reader["msg"];
            tmp.pm          = (bool)Reader["pm"];
            tmp.Sent        = (bool)Reader["sent"];
            tmp.MessageTime = (DateTime)Reader["msg_time"];

            return(tmp);
        }
Example #3
0
        internal override bool SentMessageForUser(LateMessage msg)
        {
            int           tmp   = 0;
            SqlConnection sqcon = GetCon();

            try
            {
                sqcon.Open();
                SqlCommand Command = new SqlCommand("MessageSent", sqcon);
                Command.CommandType = System.Data.CommandType.StoredProcedure;
                Command.Parameters.AddWithValue("id", msg.id);


                tmp = Command.ExecuteNonQuery();
            }
            catch
            {
            }
            sqcon.Close();
            return(tmp != 0);
        }
Example #4
0
        internal override bool AddMessageForUser(LateMessage msg)
        {
            int tmp = 0;
            SqlConnection sqcon = GetCon();
            try
            {
                sqcon.Open();
                SqlCommand Command = new SqlCommand("addLateMessage", sqcon);
                Command.CommandType = System.Data.CommandType.StoredProcedure;
                Command.Parameters.AddWithValue("uid", msg.FromUid);
                Command.Parameters.AddWithValue("toID", msg.ToUid);
                Command.Parameters.AddWithValue("message", msg.Message);
                Command.Parameters.AddWithValue("pm", msg.pm?1:0);
                Command.Parameters.AddWithValue("time", msg.MessageTime);

                tmp = Command.ExecuteNonQuery();
            }
            catch
            {

            }
            sqcon.Close();
            return tmp!=0;
        }
Example #5
0
        internal override bool AddMessageForUser(LateMessage msg)
        {
            int           tmp   = 0;
            SqlConnection sqcon = GetCon();

            try
            {
                sqcon.Open();
                SqlCommand Command = new SqlCommand("addLateMessage", sqcon);
                Command.CommandType = System.Data.CommandType.StoredProcedure;
                Command.Parameters.AddWithValue("uid", msg.FromUid);
                Command.Parameters.AddWithValue("toID", msg.ToUid);
                Command.Parameters.AddWithValue("message", msg.Message);
                Command.Parameters.AddWithValue("pm", msg.pm?1:0);
                Command.Parameters.AddWithValue("time", msg.MessageTime);

                tmp = Command.ExecuteNonQuery();
            }
            catch
            {
            }
            sqcon.Close();
            return(tmp != 0);
        }
Example #6
0
        internal override bool SentMessageForUser(LateMessage msg)
        {
            int tmp = 0;
            SqlConnection sqcon = GetCon();
            try
            {
                sqcon.Open();
                SqlCommand Command = new SqlCommand("MessageSent", sqcon);
                Command.CommandType = System.Data.CommandType.StoredProcedure;
                Command.Parameters.AddWithValue("id", msg.id);

                tmp = Command.ExecuteNonQuery();
            }
            catch
            {

            }
            sqcon.Close();
            return tmp != 0;
        }
Example #7
0
 internal abstract bool SentMessageForUser(LateMessage msg);
Example #8
0
 internal abstract bool AddMessageForUser(LateMessage msg);
Example #9
0
 internal abstract bool SentMessageForUser(LateMessage msg);
Example #10
0
 internal abstract bool AddMessageForUser(LateMessage msg);