public void DeleteForm(string keyValue) { NewsInfoEntity newsInfoEntity = new NewsInfoEntity(); newsInfoEntity.Modify(keyValue); newsInfoEntity.Remove(); service.Update(newsInfoEntity); }
public void SubmitForm(NewsInfoEntity newsInfoEntity, string keyValue) { if (!string.IsNullOrEmpty(keyValue)) { newsInfoEntity.Modify(keyValue); service.Update(newsInfoEntity); } else { newsInfoEntity.Create(); service.Insert(newsInfoEntity); } }