private void ShowInfo(int _id) { BLL.job_apply bll = new BLL.job_apply(); model = bll.GetModel(_id); }
/// <summary> /// 得到一个对象实体 /// </summary> public Model.job_apply GetModel(int ID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select ID,job_id,RealName,Sex,Birth,Marital,Origin,Hobby,School,Degree,Profess,IDNum,Address,Tel,Email,Salary,EducationExperience,WorkExperience,SelfContent,is_see,sort_id,add_time from " + databaseprefix + "job_apply "); strSql.Append(" where ID=@ID"); SqlParameter[] parameters = { new SqlParameter("@ID", SqlDbType.Int, 4) }; parameters[0].Value = ID; Model.job_apply model = new Model.job_apply(); DataSet ds = DbHelperSQL.Query(strSql.ToString(), parameters); if (ds.Tables[0].Rows.Count > 0) { if (ds.Tables[0].Rows[0]["ID"] != null && ds.Tables[0].Rows[0]["ID"].ToString() != "") { model.ID = int.Parse(ds.Tables[0].Rows[0]["ID"].ToString()); } if (ds.Tables[0].Rows[0]["job_id"] != null && ds.Tables[0].Rows[0]["job_id"].ToString() != "") { model.job_id = int.Parse(ds.Tables[0].Rows[0]["job_id"].ToString()); } if (ds.Tables[0].Rows[0]["RealName"] != null && ds.Tables[0].Rows[0]["RealName"].ToString() != "") { model.RealName = ds.Tables[0].Rows[0]["RealName"].ToString(); } if (ds.Tables[0].Rows[0]["Sex"] != null && ds.Tables[0].Rows[0]["Sex"].ToString() != "") { model.Sex = ds.Tables[0].Rows[0]["Sex"].ToString(); } if (ds.Tables[0].Rows[0]["Birth"] != null && ds.Tables[0].Rows[0]["Birth"].ToString() != "") { model.Birth = ds.Tables[0].Rows[0]["Birth"].ToString(); } if (ds.Tables[0].Rows[0]["Marital"] != null && ds.Tables[0].Rows[0]["Marital"].ToString() != "") { model.Marital = ds.Tables[0].Rows[0]["Marital"].ToString(); } if (ds.Tables[0].Rows[0]["Origin"] != null && ds.Tables[0].Rows[0]["Origin"].ToString() != "") { model.Origin = ds.Tables[0].Rows[0]["Origin"].ToString(); } if (ds.Tables[0].Rows[0]["Hobby"] != null && ds.Tables[0].Rows[0]["Hobby"].ToString() != "") { model.Hobby = ds.Tables[0].Rows[0]["Hobby"].ToString(); } if (ds.Tables[0].Rows[0]["School"] != null && ds.Tables[0].Rows[0]["School"].ToString() != "") { model.School = ds.Tables[0].Rows[0]["School"].ToString(); } if (ds.Tables[0].Rows[0]["Degree"] != null && ds.Tables[0].Rows[0]["Degree"].ToString() != "") { model.Degree = ds.Tables[0].Rows[0]["Degree"].ToString(); } if (ds.Tables[0].Rows[0]["Profess"] != null && ds.Tables[0].Rows[0]["Profess"].ToString() != "") { model.Profess = ds.Tables[0].Rows[0]["Profess"].ToString(); } if (ds.Tables[0].Rows[0]["IDNum"] != null && ds.Tables[0].Rows[0]["IDNum"].ToString() != "") { model.IDNum = ds.Tables[0].Rows[0]["IDNum"].ToString(); } if (ds.Tables[0].Rows[0]["Address"] != null && ds.Tables[0].Rows[0]["Address"].ToString() != "") { model.Address = ds.Tables[0].Rows[0]["Address"].ToString(); } if (ds.Tables[0].Rows[0]["Tel"] != null && ds.Tables[0].Rows[0]["Tel"].ToString() != "") { model.Tel = ds.Tables[0].Rows[0]["Tel"].ToString(); } if (ds.Tables[0].Rows[0]["Email"] != null && ds.Tables[0].Rows[0]["Email"].ToString() != "") { model.Email = ds.Tables[0].Rows[0]["Email"].ToString(); } if (ds.Tables[0].Rows[0]["Salary"] != null && ds.Tables[0].Rows[0]["Salary"].ToString() != "") { model.Salary = ds.Tables[0].Rows[0]["Salary"].ToString(); } if (ds.Tables[0].Rows[0]["EducationExperience"] != null && ds.Tables[0].Rows[0]["EducationExperience"].ToString() != "") { model.EducationExperience = ds.Tables[0].Rows[0]["EducationExperience"].ToString(); } if (ds.Tables[0].Rows[0]["WorkExperience"] != null && ds.Tables[0].Rows[0]["WorkExperience"].ToString() != "") { model.WorkExperience = ds.Tables[0].Rows[0]["WorkExperience"].ToString(); } if (ds.Tables[0].Rows[0]["SelfContent"] != null && ds.Tables[0].Rows[0]["SelfContent"].ToString() != "") { model.SelfContent = ds.Tables[0].Rows[0]["SelfContent"].ToString(); } if (ds.Tables[0].Rows[0]["is_see"] != null && ds.Tables[0].Rows[0]["is_see"].ToString() != "") { model.is_see = int.Parse(ds.Tables[0].Rows[0]["is_see"].ToString()); } if (ds.Tables[0].Rows[0]["sort_id"] != null && ds.Tables[0].Rows[0]["sort_id"].ToString() != "") { model.sort_id = int.Parse(ds.Tables[0].Rows[0]["sort_id"].ToString()); } if (ds.Tables[0].Rows[0]["add_time"] != null && ds.Tables[0].Rows[0]["add_time"].ToString() != "") { model.add_time = DateTime.Parse(ds.Tables[0].Rows[0]["add_time"].ToString()); } return(model); } else { return(null); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Model.job_apply model) { StringBuilder strSql = new StringBuilder(); strSql.Append("insert into " + databaseprefix + "job_apply("); strSql.Append("[job_id],[RealName],[Sex],[Birth],[Marital],[Origin],[Hobby],[School],[Degree],[Profess],[IDNum],[Address],[Tel],[Email],[Salary],[EducationExperience],[WorkExperience],[SelfContent],[is_see],[sort_id],[add_time])"); strSql.Append(" values ("); strSql.Append("@job_id,@RealName,@Sex,@Birth,@Marital,@Origin,@Hobby,@School,@Degree,@Profess,@IDNum,@Address,@Tel,@Email,@Salary,@EducationExperience,@WorkExperience,@SelfContent,@is_see,@sort_id,@add_time)"); SqlParameter[] parameters = { new SqlParameter("@job_id", SqlDbType.Int, 4), new SqlParameter("@RealName", SqlDbType.NVarChar, 50), new SqlParameter("@Sex", SqlDbType.NVarChar, 50), new SqlParameter("@Birth", SqlDbType.NVarChar, 50), new SqlParameter("@Marital", SqlDbType.NVarChar, 50), new SqlParameter("@Origin", SqlDbType.NVarChar, 50), new SqlParameter("@Hobby", SqlDbType.NVarChar, 50), new SqlParameter("@School", SqlDbType.NVarChar, 50), new SqlParameter("@Degree", SqlDbType.NVarChar, 50), new SqlParameter("@Profess", SqlDbType.NVarChar, 50), new SqlParameter("@IDNum", SqlDbType.NVarChar, 50), new SqlParameter("@Address", SqlDbType.NVarChar, 200), new SqlParameter("@Tel", SqlDbType.NVarChar, 50), new SqlParameter("@Email", SqlDbType.NVarChar, 100), new SqlParameter("@Salary", SqlDbType.NVarChar, 50), new SqlParameter("@EducationExperience", SqlDbType.Text), new SqlParameter("@WorkExperience", SqlDbType.Text), new SqlParameter("@SelfContent", SqlDbType.Text), new SqlParameter("@is_see", SqlDbType.Int, 4), new SqlParameter("@sort_id", SqlDbType.Int, 4), new SqlParameter("@add_time", SqlDbType.DateTime) }; parameters[0].Value = model.job_id; parameters[1].Value = model.RealName; parameters[2].Value = model.Sex; parameters[3].Value = model.Birth; parameters[4].Value = model.Marital; parameters[5].Value = model.Origin; parameters[6].Value = model.Hobby; parameters[7].Value = model.School; parameters[8].Value = model.Degree; parameters[9].Value = model.Profess; parameters[10].Value = model.IDNum; parameters[11].Value = model.Address; parameters[12].Value = model.Tel; parameters[13].Value = model.Email; parameters[14].Value = model.Salary; parameters[15].Value = model.EducationExperience; parameters[16].Value = model.WorkExperience; parameters[17].Value = model.SelfContent; parameters[18].Value = model.is_see; parameters[19].Value = model.sort_id; parameters[20].Value = model.add_time; int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Model.job_apply model) { return(dal.Update(model)); }
/// <summary> /// 更新一条数据 /// </summary> public bool Update(Model.job_apply model) { StringBuilder strSql = new StringBuilder(); strSql.Append("update " + databaseprefix + "job_apply set "); strSql.Append("[job_id]=@job_id,"); strSql.Append("[RealName]=@RealName,"); strSql.Append("[Sex]=@Sex,"); strSql.Append("[Birth]=@Birth,"); strSql.Append("[Marital]=@Marital,"); strSql.Append("[Origin]=@Origin,"); strSql.Append("[Hobby]=@Hobby,"); strSql.Append("[School]=@School,"); strSql.Append("[Degree]=@Degree,"); strSql.Append("]Profess]=@Profess,"); strSql.Append("[IDNum]=@IDNum,"); strSql.Append("[Address]=@Address,"); strSql.Append("[Tel]=@Tel,"); strSql.Append("[Email]=@Email,"); strSql.Append("[Salary]=@Salary,"); strSql.Append("[EducationExperience]=@EducationExperience,"); strSql.Append("[WorkExperience]=@WorkExperience,"); strSql.Append("[SelfContent]=@SelfContent,"); strSql.Append("[is_see]=@is_see,"); strSql.Append("[sort_id]=@sort_id,"); strSql.Append("[add_time]=@add_time"); strSql.Append(" where ID=@ID"); SqlParameter[] parameters = { new SqlParameter("@job_id", SqlDbType.Int, 4), new SqlParameter("@RealName", SqlDbType.NVarChar, 50), new SqlParameter("@Sex", SqlDbType.NVarChar, 50), new SqlParameter("@Birth", SqlDbType.NVarChar, 50), new SqlParameter("@Marital", SqlDbType.NVarChar, 50), new SqlParameter("@Origin", SqlDbType.NVarChar, 50), new SqlParameter("@Hobby", SqlDbType.NVarChar, 50), new SqlParameter("@School", SqlDbType.NVarChar, 50), new SqlParameter("@Degree", SqlDbType.NVarChar, 50), new SqlParameter("@Profess", SqlDbType.NVarChar, 50), new SqlParameter("@IDNum", SqlDbType.NVarChar, 50), new SqlParameter("@Address", SqlDbType.NVarChar, 200), new SqlParameter("@Tel", SqlDbType.NVarChar, 50), new SqlParameter("@Email", SqlDbType.NVarChar, 100), new SqlParameter("@Salary", SqlDbType.NVarChar, 50), new SqlParameter("@EducationExperience", SqlDbType.Text), new SqlParameter("@WorkExperience", SqlDbType.Text), new SqlParameter("@SelfContent", SqlDbType.Text), new SqlParameter("@is_see", SqlDbType.Int, 4), new SqlParameter("@sort_id", SqlDbType.Int, 4), new SqlParameter("@add_time", SqlDbType.DateTime), new SqlParameter("@ID", SqlDbType.Int, 4) }; parameters[0].Value = model.job_id; parameters[1].Value = model.RealName; parameters[2].Value = model.Sex; parameters[3].Value = model.Birth; parameters[4].Value = model.Marital; parameters[5].Value = model.Origin; parameters[6].Value = model.Hobby; parameters[7].Value = model.School; parameters[8].Value = model.Degree; parameters[9].Value = model.Profess; parameters[10].Value = model.IDNum; parameters[11].Value = model.Address; parameters[12].Value = model.Tel; parameters[13].Value = model.Email; parameters[14].Value = model.Salary; parameters[15].Value = model.EducationExperience; parameters[16].Value = model.WorkExperience; parameters[17].Value = model.SelfContent; parameters[18].Value = model.is_see; parameters[19].Value = model.sort_id; parameters[20].Value = model.add_time; parameters[21].Value = model.ID; int rows = DbHelperSQL.ExecuteSql(strSql.ToString(), parameters); if (rows > 0) { return(true); } else { return(false); } }
/// <summary> /// 增加一条数据 /// </summary> public bool Add(Model.job_apply model) { return(dal.Add(model)); }
/// <summary> /// 获得数据列表 /// </summary> public List <Model.job_apply> DataTableToList(DataTable dt) { List <Model.job_apply> modelList = new List <Model.job_apply>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Model.job_apply model; for (int n = 0; n < rowsCount; n++) { model = new Model.job_apply(); if (dt.Rows[n]["ID"] != null && dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["job_id"] != null && dt.Rows[n]["job_id"].ToString() != "") { model.job_id = int.Parse(dt.Rows[n]["job_id"].ToString()); } if (dt.Rows[n]["RealName"] != null && dt.Rows[n]["RealName"].ToString() != "") { model.RealName = dt.Rows[n]["RealName"].ToString(); } if (dt.Rows[n]["Sex"] != null && dt.Rows[n]["Sex"].ToString() != "") { model.Sex = dt.Rows[n]["Sex"].ToString(); } if (dt.Rows[n]["Birth"] != null && dt.Rows[n]["Birth"].ToString() != "") { model.Birth = dt.Rows[n]["Birth"].ToString(); } if (dt.Rows[n]["Marital"] != null && dt.Rows[n]["Marital"].ToString() != "") { model.Marital = dt.Rows[n]["Marital"].ToString(); } if (dt.Rows[n]["Origin"] != null && dt.Rows[n]["Origin"].ToString() != "") { model.Origin = dt.Rows[n]["Origin"].ToString(); } if (dt.Rows[n]["Hobby"] != null && dt.Rows[n]["Hobby"].ToString() != "") { model.Hobby = dt.Rows[n]["Hobby"].ToString(); } if (dt.Rows[n]["School"] != null && dt.Rows[n]["School"].ToString() != "") { model.School = dt.Rows[n]["School"].ToString(); } if (dt.Rows[n]["Degree"] != null && dt.Rows[n]["Degree"].ToString() != "") { model.Degree = dt.Rows[n]["Degree"].ToString(); } if (dt.Rows[n]["Profess"] != null && dt.Rows[n]["Profess"].ToString() != "") { model.Profess = dt.Rows[n]["Profess"].ToString(); } if (dt.Rows[n]["IDNum"] != null && dt.Rows[n]["IDNum"].ToString() != "") { model.IDNum = dt.Rows[n]["IDNum"].ToString(); } if (dt.Rows[n]["Address"] != null && dt.Rows[n]["Address"].ToString() != "") { model.Address = dt.Rows[n]["Address"].ToString(); } if (dt.Rows[n]["Tel"] != null && dt.Rows[n]["Tel"].ToString() != "") { model.Tel = dt.Rows[n]["Tel"].ToString(); } if (dt.Rows[n]["Email"] != null && dt.Rows[n]["Email"].ToString() != "") { model.Email = dt.Rows[n]["Email"].ToString(); } if (dt.Rows[n]["Salary"] != null && dt.Rows[n]["Salary"].ToString() != "") { model.Salary = dt.Rows[n]["Salary"].ToString(); } if (dt.Rows[n]["EducationExperience"] != null && dt.Rows[n]["EducationExperience"].ToString() != "") { model.EducationExperience = dt.Rows[n]["EducationExperience"].ToString(); } if (dt.Rows[n]["WorkExperience"] != null && dt.Rows[n]["WorkExperience"].ToString() != "") { model.WorkExperience = dt.Rows[n]["WorkExperience"].ToString(); } if (dt.Rows[n]["SelfContent"] != null && dt.Rows[n]["SelfContent"].ToString() != "") { model.SelfContent = dt.Rows[n]["SelfContent"].ToString(); } if (dt.Rows[n]["is_see"] != null && dt.Rows[n]["is_see"].ToString() != "") { model.is_see = int.Parse(dt.Rows[n]["is_see"].ToString()); } if (dt.Rows[n]["sort_id"] != null && dt.Rows[n]["sort_id"].ToString() != "") { model.sort_id = int.Parse(dt.Rows[n]["sort_id"].ToString()); } if (dt.Rows[n]["add_time"] != null && dt.Rows[n]["add_time"].ToString() != "") { model.add_time = DateTime.Parse(dt.Rows[n]["add_time"].ToString()); } modelList.Add(model); } } return(modelList); }
/// <summary> /// 获得数据列表 /// </summary> public List<Model.job_apply> DataTableToList(DataTable dt) { List<Model.job_apply> modelList = new List<Model.job_apply>(); int rowsCount = dt.Rows.Count; if (rowsCount > 0) { Model.job_apply model; for (int n = 0; n < rowsCount; n++) { model = new Model.job_apply(); if (dt.Rows[n]["ID"] != null && dt.Rows[n]["ID"].ToString() != "") { model.ID = int.Parse(dt.Rows[n]["ID"].ToString()); } if (dt.Rows[n]["job_id"] != null && dt.Rows[n]["job_id"].ToString() != "") { model.job_id = int.Parse(dt.Rows[n]["job_id"].ToString()); } if (dt.Rows[n]["RealName"] != null && dt.Rows[n]["RealName"].ToString() != "") { model.RealName = dt.Rows[n]["RealName"].ToString(); } if (dt.Rows[n]["Sex"] != null && dt.Rows[n]["Sex"].ToString() != "") { model.Sex = dt.Rows[n]["Sex"].ToString(); } if (dt.Rows[n]["Birth"] != null && dt.Rows[n]["Birth"].ToString() != "") { model.Birth = dt.Rows[n]["Birth"].ToString(); } if (dt.Rows[n]["Marital"] != null && dt.Rows[n]["Marital"].ToString() != "") { model.Marital = dt.Rows[n]["Marital"].ToString(); } if (dt.Rows[n]["Origin"] != null && dt.Rows[n]["Origin"].ToString() != "") { model.Origin = dt.Rows[n]["Origin"].ToString(); } if (dt.Rows[n]["Hobby"] != null && dt.Rows[n]["Hobby"].ToString() != "") { model.Hobby = dt.Rows[n]["Hobby"].ToString(); } if (dt.Rows[n]["School"] != null && dt.Rows[n]["School"].ToString() != "") { model.School = dt.Rows[n]["School"].ToString(); } if (dt.Rows[n]["Degree"] != null && dt.Rows[n]["Degree"].ToString() != "") { model.Degree = dt.Rows[n]["Degree"].ToString(); } if (dt.Rows[n]["Profess"] != null && dt.Rows[n]["Profess"].ToString() != "") { model.Profess = dt.Rows[n]["Profess"].ToString(); } if (dt.Rows[n]["IDNum"] != null && dt.Rows[n]["IDNum"].ToString() != "") { model.IDNum = dt.Rows[n]["IDNum"].ToString(); } if (dt.Rows[n]["Address"] != null && dt.Rows[n]["Address"].ToString() != "") { model.Address = dt.Rows[n]["Address"].ToString(); } if (dt.Rows[n]["Tel"] != null && dt.Rows[n]["Tel"].ToString() != "") { model.Tel = dt.Rows[n]["Tel"].ToString(); } if (dt.Rows[n]["Email"] != null && dt.Rows[n]["Email"].ToString() != "") { model.Email = dt.Rows[n]["Email"].ToString(); } if (dt.Rows[n]["Salary"] != null && dt.Rows[n]["Salary"].ToString() != "") { model.Salary = dt.Rows[n]["Salary"].ToString(); } if (dt.Rows[n]["EducationExperience"] != null && dt.Rows[n]["EducationExperience"].ToString() != "") { model.EducationExperience = dt.Rows[n]["EducationExperience"].ToString(); } if (dt.Rows[n]["WorkExperience"] != null && dt.Rows[n]["WorkExperience"].ToString() != "") { model.WorkExperience = dt.Rows[n]["WorkExperience"].ToString(); } if (dt.Rows[n]["SelfContent"] != null && dt.Rows[n]["SelfContent"].ToString() != "") { model.SelfContent = dt.Rows[n]["SelfContent"].ToString(); } if (dt.Rows[n]["is_see"] != null && dt.Rows[n]["is_see"].ToString() != "") { model.is_see = int.Parse(dt.Rows[n]["is_see"].ToString()); } if (dt.Rows[n]["sort_id"] != null && dt.Rows[n]["sort_id"].ToString() != "") { model.sort_id = int.Parse(dt.Rows[n]["sort_id"].ToString()); } if (dt.Rows[n]["add_time"] != null && dt.Rows[n]["add_time"].ToString() != "") { model.add_time = DateTime.Parse(dt.Rows[n]["add_time"].ToString()); } modelList.Add(model); } } return modelList; }
/// <summary> /// 得到一个对象实体 /// </summary> public Model.job_apply GetModel(int ID) { StringBuilder strSql=new StringBuilder(); strSql.Append("select ID,job_id,RealName,Sex,Birth,Marital,Origin,Hobby,School,Degree,Profess,IDNum,Address,Tel,Email,Salary,EducationExperience,WorkExperience,SelfContent,is_see,sort_id,add_time from " + databaseprefix + "job_apply "); strSql.Append(" where ID=@ID"); SqlParameter[] parameters = { new SqlParameter("@ID", SqlDbType.Int,4) }; parameters[0].Value = ID; Model.job_apply model=new Model.job_apply(); DataSet ds=DbHelperSQL.Query(strSql.ToString(),parameters); if(ds.Tables[0].Rows.Count>0) { if(ds.Tables[0].Rows[0]["ID"]!=null && ds.Tables[0].Rows[0]["ID"].ToString()!="") { model.ID=int.Parse(ds.Tables[0].Rows[0]["ID"].ToString()); } if(ds.Tables[0].Rows[0]["job_id"]!=null && ds.Tables[0].Rows[0]["job_id"].ToString()!="") { model.job_id = int.Parse(ds.Tables[0].Rows[0]["job_id"].ToString()); } if(ds.Tables[0].Rows[0]["RealName"]!=null && ds.Tables[0].Rows[0]["RealName"].ToString()!="") { model.RealName=ds.Tables[0].Rows[0]["RealName"].ToString(); } if(ds.Tables[0].Rows[0]["Sex"]!=null && ds.Tables[0].Rows[0]["Sex"].ToString()!="") { model.Sex=ds.Tables[0].Rows[0]["Sex"].ToString(); } if(ds.Tables[0].Rows[0]["Birth"]!=null && ds.Tables[0].Rows[0]["Birth"].ToString()!="") { model.Birth=ds.Tables[0].Rows[0]["Birth"].ToString(); } if(ds.Tables[0].Rows[0]["Marital"]!=null && ds.Tables[0].Rows[0]["Marital"].ToString()!="") { model.Marital=ds.Tables[0].Rows[0]["Marital"].ToString(); } if(ds.Tables[0].Rows[0]["Origin"]!=null && ds.Tables[0].Rows[0]["Origin"].ToString()!="") { model.Origin=ds.Tables[0].Rows[0]["Origin"].ToString(); } if(ds.Tables[0].Rows[0]["Hobby"]!=null && ds.Tables[0].Rows[0]["Hobby"].ToString()!="") { model.Hobby=ds.Tables[0].Rows[0]["Hobby"].ToString(); } if(ds.Tables[0].Rows[0]["School"]!=null && ds.Tables[0].Rows[0]["School"].ToString()!="") { model.School=ds.Tables[0].Rows[0]["School"].ToString(); } if (ds.Tables[0].Rows[0]["Degree"] != null && ds.Tables[0].Rows[0]["Degree"].ToString() != "") { model.Degree = ds.Tables[0].Rows[0]["Degree"].ToString(); } if(ds.Tables[0].Rows[0]["Profess"]!=null && ds.Tables[0].Rows[0]["Profess"].ToString()!="") { model.Profess=ds.Tables[0].Rows[0]["Profess"].ToString(); } if(ds.Tables[0].Rows[0]["IDNum"]!=null && ds.Tables[0].Rows[0]["IDNum"].ToString()!="") { model.IDNum=ds.Tables[0].Rows[0]["IDNum"].ToString(); } if(ds.Tables[0].Rows[0]["Address"]!=null && ds.Tables[0].Rows[0]["Address"].ToString()!="") { model.Address=ds.Tables[0].Rows[0]["Address"].ToString(); } if(ds.Tables[0].Rows[0]["Tel"]!=null && ds.Tables[0].Rows[0]["Tel"].ToString()!="") { model.Tel=ds.Tables[0].Rows[0]["Tel"].ToString(); } if(ds.Tables[0].Rows[0]["Email"]!=null && ds.Tables[0].Rows[0]["Email"].ToString()!="") { model.Email=ds.Tables[0].Rows[0]["Email"].ToString(); } if(ds.Tables[0].Rows[0]["Salary"]!=null && ds.Tables[0].Rows[0]["Salary"].ToString()!="") { model.Salary=ds.Tables[0].Rows[0]["Salary"].ToString(); } if (ds.Tables[0].Rows[0]["EducationExperience"] != null && ds.Tables[0].Rows[0]["EducationExperience"].ToString() != "") { model.EducationExperience = ds.Tables[0].Rows[0]["EducationExperience"].ToString(); } if (ds.Tables[0].Rows[0]["WorkExperience"] != null && ds.Tables[0].Rows[0]["WorkExperience"].ToString() != "") { model.WorkExperience = ds.Tables[0].Rows[0]["WorkExperience"].ToString(); } if(ds.Tables[0].Rows[0]["SelfContent"]!=null && ds.Tables[0].Rows[0]["SelfContent"].ToString()!="") { model.SelfContent=ds.Tables[0].Rows[0]["SelfContent"].ToString(); } if (ds.Tables[0].Rows[0]["is_see"] != null && ds.Tables[0].Rows[0]["is_see"].ToString() != "") { model.is_see = int.Parse(ds.Tables[0].Rows[0]["is_see"].ToString()); } if (ds.Tables[0].Rows[0]["sort_id"] != null && ds.Tables[0].Rows[0]["sort_id"].ToString() != "") { model.sort_id = int.Parse(ds.Tables[0].Rows[0]["sort_id"].ToString()); } if(ds.Tables[0].Rows[0]["add_time"]!=null && ds.Tables[0].Rows[0]["add_time"].ToString()!="") { model.add_time=DateTime.Parse(ds.Tables[0].Rows[0]["add_time"].ToString()); } return model; } else { return null; } }