Beispiel #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;
        }
Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #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);
        }
Beispiel #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;
        }
Beispiel #7
0
 internal abstract bool SentMessageForUser(LateMessage msg);
Beispiel #8
0
 internal abstract bool AddMessageForUser(LateMessage msg);
Beispiel #9
0
 internal abstract bool SentMessageForUser(LateMessage msg);
Beispiel #10
0
 internal abstract bool AddMessageForUser(LateMessage msg);