Ejemplo n.º 1
0
        public IActionResult DeleteRow(XPEmailModel email)
        {
            XPEmail deleteEmailInfo = LargeDatabaseUnitOfWork.FindObject <XPEmail>(CriteriaOperator.Parse("ID = ?", email.ID));

            LargeDatabaseUnitOfWork.Delete(deleteEmailInfo);
            LargeDatabaseUnitOfWork.CommitChanges();
            return(PartialView("GridViewPartial", LargeDatabaseUnitOfWork.Emails));
        }
Ejemplo n.º 2
0
        public IActionResult UpdateRow(XPEmailModel email)
        {
            XPEmail newInfo = LargeDatabaseUnitOfWork.FindObject <XPEmail>(CriteriaOperator.Parse("ID = ?", email.ID));

            newInfo.From          = email.From;
            newInfo.ID            = email.ID;
            newInfo.Subject       = email.Subject;
            newInfo.Sent          = email.Sent;
            newInfo.Size          = email.Size;
            newInfo.HasAttachment = email.HasAttachment;
            LargeDatabaseUnitOfWork.CommitChanges();
            return(PartialView("GridViewPartial", LargeDatabaseUnitOfWork.Emails));
        }
Ejemplo n.º 3
0
        public IActionResult AddNewRow(XPEmailModel email)
        {
            XPEmail newInfo = new XPEmail(LargeDatabaseUnitOfWork);

            newInfo.From          = email.From;
            newInfo.ID            = email.ID;
            newInfo.Subject       = email.Subject;
            newInfo.Sent          = email.Sent;
            newInfo.Size          = email.Size;
            newInfo.HasAttachment = email.HasAttachment;
            LargeDatabaseUnitOfWork.CommitChanges();
            return(PartialView("GridViewPartial", LargeDatabaseUnitOfWork.Emails));
        }