public static List <ResumeTable> getAll(int id) { string sql = "select * from ResumeTable where re_UserId = '" + id + "';"; SqlParameter[] p = new SqlParameter[] { }; DataTable dt = SqlHelper.ExecuteDataTable(sql, p); List <ResumeTable> l = new List <ResumeTable>(); if (dt.Rows.Count > 0) { foreach (DataRow row in dt.Rows) { try { ResumeTable re = new ResumeTable(); re.re_Edu = row["re_Edu"].ToString(); re.re_WorkTime = row["re_WorkTime"].ToString(); re.re_Describe = row["re_Describe"].ToString(); re.re_Skill = row["re_Skill"].ToString(); l.Add(re); } catch { } } } return(l); }
/// <summary> /// 插入数据[cat66] /// </summary> /// <param name="user"></param> public static void insertdata(string user, int ptid) { //int ptid=1; int sid = StudentTable.getstuid(user); int reid = ResumeTable.getreid(sid); string sql = "insert into DeliveryTable(RE_Id,PT_Id) values(@reid,@ptid)"; SqlHelper.ExecuteNonQuery(sql, new SqlParameter("reid", reid), new SqlParameter("ptid", ptid)); }
public static void SetDr2Model(DataRow dr, Delivery model) { if (dr["PT_Id"].ToString() != "") { model.PT_Id = int.Parse(dr["PT_Id"].ToString()); model.DE_PTJob = new PTJob(); PTJobTable.SetDr2Model(dr, model.DE_PTJob); } if (dr["DE_Id"].ToString() != "") { model.DE_Id = int.Parse(dr["DE_Id"].ToString()); } if (dr["RE_Id"].ToString() != "") { model.RE_Id = int.Parse(dr["RE_Id"].ToString()); model.DE_Resume = new Resume(); ResumeTable.SetDr2Model(dr, model.DE_Resume); } model.RE_Pass = dr["RE_Pass"].ToString(); if (dr["DE_Time"].ToString() != "") { model.DE_Time = DateTime.Parse(dr["DE_Time"].ToString()); } }