Ejemplo n.º 1
0
        public static int Delete(EducationLevel e)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@iEducationLevelID", e.EducationLevelID);
            return(db.ExecuteNonQuery("JobsDb_EducationLevels_Delete"));
        }
Ejemplo n.º 2
0
        public static int Update(EducationLevel l)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@iEducationLevelID", l.EducationLevelID);
            db.AddParameter("@sEducationLevelName", l.EducationLevelName);
            return(db.ExecuteNonQuery("JobsDb_EducationLevels_Update"));
        }
Ejemplo n.º 3
0
        public static int Insert(EducationLevel l)
        {
            DBAccess db = new DBAccess();
            db.AddParameter("@sEducationLevelName", l.EducationLevelName);
            SqlParameter p = new SqlParameter("@iEducationLevelID", SqlDbType.Int);
            p.Direction = ParameterDirection.Output;
            db.AddParameter(p);

            int retval = db.ExecuteNonQuery("JobsDb_EducationLevels_Insert");
            if (retval == 1)
            {
                return int.Parse(p.Value.ToString());
            }
            else
            {
                return -1;
            }
        }
Ejemplo n.º 4
0
        public static int Insert(EducationLevel l)
        {
            DBAccess db = new DBAccess();

            db.AddParameter("@sEducationLevelName", l.EducationLevelName);
            SqlParameter p = new SqlParameter("@iEducationLevelID", SqlDbType.Int);

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

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

            if (retval == 1)
            {
                return(int.Parse(p.Value.ToString()));
            }
            else
            {
                return(-1);
            }
        }
Ejemplo n.º 5
0
 public static int Update(EducationLevel l)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@iEducationLevelID", l.EducationLevelID);
     db.AddParameter("@sEducationLevelName", l.EducationLevelName);
     return db.ExecuteNonQuery("JobsDb_EducationLevels_Update");
 }
Ejemplo n.º 6
0
 public static int Delete(EducationLevel e)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@iEducationLevelID",e.EducationLevelID);
     return db.ExecuteNonQuery("JobsDb_EducationLevels_Delete");
 }