Quantcast
Channel: Editor — DataTables forums
Viewing all articles
Browse latest Browse all 3800

Soft Edit

$
0
0

There are a couple hints on this forum indicating there is a easy way to enable a soft edit. I need more conclusive information than the hints I found elsewhere on the forum.

Essentially what I want to do is mark a existing row as bool named "OldVersion", and otherwise leave it unchanged and create a new row with the edited information.

This would give me a very nice history of edits.

Here is my database insert part of my controller.

            using (var db = new Database(settings.DbType, settings.DbConnection))
            {

                var response = new Editor(db, "GR_AlternativeBilling", "TableID")
                    .Model<GR_AlternativeBilling>()
                    .Where("OldVersion", false, "=")
                    .TryCatch(false)
                    .Process(requestCreate)
                    .Data();

                return Json(response, JsonRequestBehavior.AllowGet);
            }

Viewing all articles
Browse latest Browse all 3800

Trending Articles