Ejemplo n.º 1
0
        public OCA.Common.DataSets.Kartabl.MessageBox GetReceivedMessages(string Username)
        {
            sda = new SqlDataAdapter(" select * from Tbl_MessageBox WHERE Receiver_User = '******' and Owner_User = '******' ORDER BY Message_Num DESC", conn);

            try
            {
                dsmessage.Clear();

                if (conn.State == ConnectionState.Closed)
                {
                    conn.Open();
                }

                sda.Fill(dsmessage.Tbl_MessageBox);

                return(dsmessage);
            }
            catch
            {
                throw new Exception("خطا در ارتباط با بانک اطلاعاتی!");
            }
            finally
            {
                conn.Close();
            }
        }
Ejemplo n.º 2
0
 public OCA.Common.DataSets.Kartabl.MessageBox GetReceivedMessages(string Username)
 {
     try
     {
         dsmessage.Clear();
         dsmessage = messageclass.GetReceivedMessages(Username);
         return(dsmessage);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message);
     }
 }