Exemple #1
0
        public override string ToString()
        {
            string str = "";

            str += "&idserver=\"" + IDServer.ToString() + "\"";

            if (IDUser != -1)
            {
                str += "&iduser=\"" + IDUser.ToString() + "\"";
            }
            if (!Title.Equals(""))
            {
                str += "&title=\"" + Title + "\"";
            }
            if (!MessageText.Equals(""))
            {
                str += "&messagetext=\"" + MessageText + "\"";
            }
            str += "&seen=\"" + seen.ToString() + "\"";
            if (InsertDate != null)
            {
                str += "&insertdate=\"" + InsertDate.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }
            if (UpdateDate != null)
            {
                str += "&updatedate=\"" + UpdateDate.ToString("yyyy-MM-dd HH:mm:ss") + "\"";
            }

            return(str.Substring(1));
        }
Exemple #2
0
 private bool CheckField()
 {
     if (MessageText.Equals(string.Empty))
     {
         throw new Exception("Please send a valid message");
     }
     return(true);
 }