public void ActionAdd(ModVideoProductModel model) { if (model.RecordID > 0) { entity = ModVideoProductService.Instance.GetByID(model.RecordID); // khoi tao gia tri mac dinh khi update } else { entity = new ModVideoProductEntity(); // khoi tao gia tri mac dinh khi insert } ViewBag.Data = entity; ViewBag.Model = model; }
public void ActionAdd(ModVideoProductModel model) { if (model.RecordID > 0) { entity = ModVideoProductService.Instance.GetByID(model.RecordID); // khoi tao gia tri mac dinh khi update } else { entity = new ModVideoProductEntity(); // khoi tao gia tri mac dinh khi insert } ViewBag.Data = entity; ViewBag.Model = model; }