Ejemplo n.º 1
0
 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;
 }
Ejemplo n.º 2
0
 public void AddJob(Job j)
 {
     throw new NotImplementedException();
 }