Пример #1
0
        public static int Delete(MyResume r)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@iMyResumeID", r.MyResumeID);
            return(db.ExecuteNonQuery("JobsDb_MyResumes_Delete"));
        }
Пример #2
0
        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;
            }
        }
Пример #3
0
        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);
            }
        }
Пример #4
0
 public static int Delete(MyResume r)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@iMyResumeID",r.MyResumeID);
     return db.ExecuteNonQuery("JobsDb_MyResumes_Delete");
 }