public ApplicantInformationVO GetByID(int id) { ApplicantInformationVO vo = new ApplicantInformationVO(); DataTable dt = Select("ID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObjWithImage(dt.Rows[0], new ApplicantInformationVO()) as ApplicantInformationVO; } return(vo); }
public int Insert(ApplicantInformationVO vo) { int lastInsertId = 0; try { lastInsertId = b.InsertWithImage("Applicant_Information", b.ConvertColName(vo), b.ConvertValueList(vo), vo.ApplicantPhoto); } catch (Exception ex) { throw ex; } return(lastInsertId); }
public int Create(ApplicantInformationVO vo) { int id; if (!dao.isExist(vo.Id.ToString())) { id = dao.Insert(vo); } else { id = dao.Update(vo); } return(id); }
public int Update(ApplicantInformationVO vo) { int applicantID = 0; try { b.UpdateWithImage("Applicant_Information", vo.Id.ToString(), b.ConvertColName(vo), b.ConvertValueList(vo), vo.ApplicantPhoto); applicantID = vo.Id; } catch (Exception ex) { throw ex; } return(applicantID); }