예제 #1
0
파일: libjobs.cs 프로젝트: nbende/ASPDEMOS
 public Job GetJobInfo(int jobid)
 {
     SqlConnection cn = new SqlConnection(cnstr);
     SqlCommand cmd = new SqlCommand
         ("Select * from jobs where job_id=" + jobid, cn);
     cn.Open();
     SqlDataReader dr = cmd.ExecuteReader();
     Job j = new Job();
     if (dr.Read())
     {
         j.Id = jobid;
         j.Description = dr["job_desc"].ToString();
         j.minlvl = Convert.ToInt32(dr["min_lvl"]);
         j.maxlvl = Convert.ToInt32(dr["max_lvl"]);
     }
     else
     {
         j.Id = -1;
     }
     cn.Close();
     return j;
 }
예제 #2
0
파일: libjobs.cs 프로젝트: nbende/ASPDEMOS
 public void AddJob(Job j)
 {
     throw new NotImplementedException();
 }