public JsonResult PostComment(Note note, int id, string Comments)
        {
            List <Object> Adicionado = new List <Object>();
            var           company    = _companyServices.Find(id);

            var companyNote = new CompanyNote()
            {
                Company = company, Note = note
            };

            note.UserSettingId    = _currentUser.Id();
            note.BusinessEntityId = _currentUser.GetCurrentBusinessEntityId();

            try
            {
                _companyNoteServices.Add(companyNote);
                Adicionado.Add(new
                {
                    Sucesso = true,
                    Msg     = Comments
                });
            }
            catch (Exception e)
            {
                Adicionado.Add(new
                {
                    Erro = true,
                    Msg  = e.InnerException.Message
                });
            }

            return(Json(Adicionado));
        }
Beispiel #2
0
 public void Update(CompanyNote companyNote)
 {
     _companyNoteDal.Update(companyNote);
 }
Beispiel #3
0
 public void Add(CompanyNote companyNote)
 {
     _companyNoteDal.Add(companyNote);
 }
Beispiel #4
0
        private void Note_ButtonItem_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            CompanyNote frm = new CompanyNote();

            frm.Show();
        }