//================================================================ //データ削除処理 //================================================================ public bool remove(int id, ref string resErrMsg) { DateTime regDate = DateTime.Now; bool result = false; try { using (umekoudbDataContext dc = new umekoudbDataContext()) { using (System.Transactions.TransactionScope ts = new System.Transactions.TransactionScope()) { var deleteItems = (from o in dc.GetTable <card_t>() where o.id == id select o); if (deleteItems.Count() == 0) { resErrMsg = "削除しようとしたデータはすでに存在しませんでした"; return(false); } card_t deleteItem = deleteItems.Single(); //データ削除 dc.GetTable <card_t>().DeleteOnSubmit(deleteItem); dc.SubmitChanges(); ts.Complete(); } } result = true; } catch (Exception e) { resErrMsg = e.Message; result = false; } return(result); }
public void setData(card_t pRaw) { this.raw = pRaw; }
public CardContentData() { this.raw = new card_t(); }
partial void Deletecard_t(card_t instance);
partial void Updatecard_t(card_t instance);
partial void Insertcard_t(card_t instance);