Beispiel #1
0
        public static int Delete(MyJob j)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@iMyJobID", j.MyJobID);
            return(db.ExecuteNonQuery("JobsDb_MyJobs_Delete"));
        }
 protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
 {
     MyJob j = new MyJob();
     j.PostingID = int.Parse(Request.QueryString["id"]);
     j.UserName = Profile.UserName;
     MyJob.Insert(j);
 }
Beispiel #3
0
        public static int Insert(MyJob j)
        {
            DBAccess db = new DBAccess();
            db.AddParameter("@iPostingID", j.PostingID);
            db.AddParameter("@sUserName", j.UserName);
            SqlParameter p = new SqlParameter("@iMyJobID", SqlDbType.Int);
            p.Direction = ParameterDirection.Output;
            db.AddParameter(p);

            int retval = db.ExecuteNonQuery("JobsDb_MyJobs_Insert");
            if (retval == 1)
            {
                return int.Parse(p.Value.ToString());
            }
            else
            {
                return -1;
            }
        }
Beispiel #4
0
        public static int Insert(MyJob j)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@iPostingID", j.PostingID);
            db.AddParameter("@sUserName", j.UserName);
            SqlParameter p = new SqlParameter("@iMyJobID", SqlDbType.Int);

            p.Direction = ParameterDirection.Output;
            db.AddParameter(p);

            int retval = db.ExecuteNonQuery("JobsDb_MyJobs_Insert");

            if (retval == 1)
            {
                return(int.Parse(p.Value.ToString()));
            }
            else
            {
                return(-1);
            }
        }
Beispiel #5
0
 public static int Delete(MyJob j)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@iMyJobID",j.MyJobID);
     return db.ExecuteNonQuery("JobsDb_MyJobs_Delete");
 }