public ActionResult Edit(int id = 0) { if (id == 0) { return(View(new ShareOrderConfig())); } else { return(View(ShareOrderConfigManager.GetShareOrderConfigById(id))); } }
public void AddOprLog(ShareOrderConfig model, string opr) { OprLog oprModel = new OprLog(); if (model != null) { oprModel.AfterValue = JsonConvert.SerializeObject(model); } var result = ShareOrderConfigManager.GetShareOrderConfigById(model.Id); if (result != null) { oprModel.BeforeValue = JsonConvert.SerializeObject(result); } oprModel.Author = User.Identity.Name; oprModel.ChangeDatetime = DateTime.Now; oprModel.HostName = Request.UserHostName; oprModel.ObjectID = model.Id; oprModel.ObjectType = "SESOC"; oprModel.Operation = opr; OprLogManager.AddOprLog(oprModel); }