public static int Delete(MyResume r) { DBAccess db = new DBAccess(); db.AddParameter("@iMyResumeID", r.MyResumeID); return(db.ExecuteNonQuery("JobsDb_MyResumes_Delete")); }
public static int Insert(MyResume r) { DBAccess db = new DBAccess(); db.AddParameter("@iResumeID", r.ResumeID); db.AddParameter("@sUserName", r.UserName); SqlParameter p = new SqlParameter("@iMyResumeID", SqlDbType.Int); p.Direction = ParameterDirection.Output; db.AddParameter(p); int retval = db.ExecuteNonQuery("JobsDb_MyResumes_Insert"); if (retval == 1) { return int.Parse(p.Value.ToString()); } else { return -1; } }
public static int Insert(MyResume r) { DBAccess db = new DBAccess(); db.AddParameter("@iResumeID", r.ResumeID); db.AddParameter("@sUserName", r.UserName); SqlParameter p = new SqlParameter("@iMyResumeID", SqlDbType.Int); p.Direction = ParameterDirection.Output; db.AddParameter(p); int retval = db.ExecuteNonQuery("JobsDb_MyResumes_Insert"); if (retval == 1) { return(int.Parse(p.Value.ToString())); } else { return(-1); } }
public static int Delete(MyResume r) { DBAccess db = new DBAccess(); db.AddParameter("@iMyResumeID",r.MyResumeID); return db.ExecuteNonQuery("JobsDb_MyResumes_Delete"); }