public static void SoftDeleteData(int id) { PenjaminanDatasetTableAdapters.m_bidangusahaTableAdapter ta = new PenjaminanDatasetTableAdapters.m_bidangusahaTableAdapter(); PenjaminanDataset.m_bidangusahaDataTable dt = ta.GetDataBidangUsahaByID(id); try { if (dt != null) { dt[0].deleted = 1; ta.Update(dt); } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } }
public static void UpdateData(int Id, string Name, string Description) { PenjaminanDatasetTableAdapters.m_bidangusahaTableAdapter ta = new PenjaminanDatasetTableAdapters.m_bidangusahaTableAdapter(); PenjaminanDataset.m_bidangusahaDataTable dt = ta.GetDataBidangUsahaByID(Id); try { if (dt != null) { dt[0].name = Name; dt[0].description = Description; dt[0].lastupdatedby = 1; dt[0].lastupdateddate = DateTime.Now; ta.Update(dt); } } catch (Exception ex) { throw new ApplicationException(ex.Message, ex); } }