public void AddNewMessage(MessageFromCompanyModel messageModel)
 {
     try
     {
         MessageDAL.AddNewMessage(messageModel);
     }
     catch (Exception e)
     {
     }
 }
Ejemplo n.º 2
0
 public void AddNewMessageToBuliding(MessageFromCompanyModel messageModel)
 {
     try
     {
         MessageDAL messageDAL = new MessageDAL();
         messageDAL.AddNewMessage(messageModel);
     }
     catch (Exception e)
     {
     }
 }
Ejemplo n.º 3
0
 public void AddNewMessage(MessageFromCompanyModel messageModel)
 {
     try
     {
         MessageDAL messageDAL = new MessageDAL();
         messageDAL.AddNewMessage(messageModel);
     }
     catch (Exception e)
     {
         throw new Exception(e.Message);
     }
 }
Ejemplo n.º 4
0
        public void AddNewMessageTest()
        {
            MessageFromCompanyModel model = new MessageFromCompanyModel();

            model.Subject = "TestMessage";
            model.Text    = "TestValue";
            CompanyDAL companyDAL = new CompanyDAL();

            model.CompanyId = companyDAL.GetCompanies().Select(x => x.Id).Min();
            MessageDAL messageDAL = new MessageDAL();

            messageDAL.AddNewMessage(model);
            MessageFromCompanyModel testmodel = messageDAL.GetMessagesByCompany(model.CompanyId).Where(x => x.Subject == "TestMessage" && x.Text == "TestValue").FirstOrDefault();

            Assert.That(testmodel != null, Is.True);
        }