public static void UpdateDeleted(int id) { PenjaminanDatasetTableAdapters.AccessTableAdapter ta = new PenjaminanDatasetTableAdapters.AccessTableAdapter(); PenjaminanDataset.AccessDataTable dt = ta.GetDataRestore(id); try { if (dt != null) { dt[0].deleted = "0"; ta.Update(dt); } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } }
public static void UpdateData(int id, int fk_role, int fk_page) { PenjaminanDatasetTableAdapters.AccessTableAdapter ta = new PenjaminanDatasetTableAdapters.AccessTableAdapter(); PenjaminanDataset.AccessDataTable dt = ta.GetDataByID(id); try { if (dt != null) { dt[0].fk_page = fk_page; dt[0].fk_role = fk_role; dt[0].updateby = "1"; dt[0].updatedate = DateTime.Now; ta.Update(dt); } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } }