public bool Delete() { DbAccess db = new DbAccess(); db.BeginTransaction(); try { db.CreateNewSqlCommand(); db.AddParameter("@ID", ID); db.ExecuteNonQueryWithTransaction("NW_Teamview_Delete"); db.CommitTransaction(); return true; } catch { db.RollbackTransaction(); return false; } }
public bool Delete() { DbAccess db = new DbAccess(); db.BeginTransaction(); try { db.CreateNewSqlCommand(); db.AddParameter("@ID", ID); db.ExecuteNonQueryWithTransaction("NW_Teamview_Delete"); db.CommitTransaction(); return(true); } catch { db.RollbackTransaction(); return(false); } }
public bool Insert() { DbAccess db = new DbAccess(); db.BeginTransaction(); try { db.CreateNewSqlCommand(); db.AddParameter("@ID", ID); db.AddParameter("@Pass", Pass); db.AddParameter("@User", User); db.AddParameter("@PC", PC); db.AddParameter("@DateTime", DateTime); db.AddParameter("@Location", Location); db.ExecuteNonQueryWithTransaction("NW_Teamview_Insert"); db.CommitTransaction(); return true; } catch { db.RollbackTransaction(); return false; } }
public bool Insert() { DbAccess db = new DbAccess(); db.BeginTransaction(); try { db.CreateNewSqlCommand(); db.AddParameter("@ID", ID); db.AddParameter("@Pass", Pass); db.AddParameter("@User", User); db.AddParameter("@PC", PC); db.AddParameter("@DateTime", DateTime); db.AddParameter("@Location", Location); db.ExecuteNonQueryWithTransaction("NW_Teamview_Insert"); db.CommitTransaction(); return(true); } catch { db.RollbackTransaction(); return(false); } }