Ejemplo n.º 1
0
        public static DataSet SearchJobs(string skills,int countryid,int stateid,string city)
        {
            string[] arr = skills.Split(' ');
            DataSet ds = new DataSet();
            DataSet dsTemp = new DataSet();
            bool flag = false;

            DBAccess db = new DBAccess();

            foreach (string s in arr)
            {
                db.AddParameter("@sSkill", s);
                if (countryid == -1)
                {
                    db.AddParameter("@iCountryID", DBNull.Value);
                }
                else
                {
                    db.AddParameter("@iCountryID", countryid);
                }
                if (stateid == -1)
                {
                    db.AddParameter("@iStateID", DBNull.Value);
                }
                else
                {
                    db.AddParameter("@iStateID", stateid);
                }
                if (city=="")
                {
                    db.AddParameter("@sCity", DBNull.Value);
                }
                else
                {
                    db.AddParameter("@sCity", city);
                }
                dsTemp = db.ExecuteDataSet("JobsDb_JobPostings_SelectForMatchingSkills");
                db.Parameters.Clear();
                ds.Merge(dsTemp);
                if (flag == false)
                {
                    DataColumn[] pk = new DataColumn[1];
                    pk[0] = ds.Tables[0].Columns["postingid"];
                    ds.Tables[0].PrimaryKey = pk;
                    flag = true;
                }
            }
            return ds;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 获取最近七天的职位信息
 /// </summary>
 /// <returns></returns>
 public static DataSet GetLatest()
 {
     DBAccess db = new DBAccess();
     return db.ExecuteDataSet("JobsDb_JobPostings_GetLatest");
 }
Ejemplo n.º 3
0
 public static DataSet GetPostings(string username)
 {
     DBAccess db = new DBAccess();
     db.Parameters.Add(new SqlParameter("@sUserName", username));
     DataSet ds = db.ExecuteDataSet("JobsDb_JobPostings_SelectByUser");
     return ds;
 }
Ejemplo n.º 4
0
 public static DataSet GetExperienceLevels()
 {
     DBAccess db = new DBAccess();
     return db.ExecuteDataSet("JobsDb_ExperienceLevels_SelectAll");
 }
Ejemplo n.º 5
0
 public static DataSet GetMyResumes(string username)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@sUserName", username);
     return db.ExecuteDataSet("JobsDb_MyResumes_SelectForUser");
 }
Ejemplo n.º 6
0
 public static DataSet GetStates(int countryid)
 {
     DBAccess db = new DBAccess();
     db.AddParameter("@iCountryID", countryid);
     return db.ExecuteDataSet("JobsDb_States_SelectForCountry");
 }
Ejemplo n.º 7
0
 public static DataSet GetStates()
 {
     DBAccess db = new DBAccess();
     return db.ExecuteDataSet("JobsDb_States_SelectAll");
 }
Ejemplo n.º 8
0
 public DataSet SelectCountries()
 {
     DBAccess db = new DBAccess();
     return db.ExecuteDataSet("JobsDb_Countries_SelectAll");
 }