public EmployeeVO GetByApplicantID(int id) { EmployeeVO vo = new EmployeeVO(); DataTable dt = Select("ApplicantID=" + id + ""); if (dt.Rows.Count > 0) { vo = b.ConvertObjWithImage(dt.Rows[0], new EmployeeVO()) as EmployeeVO; } return(vo); }
public EmployeeVO GetByFingerIDAndActive(int FingerId) { EmployeeVO vo = new EmployeeVO(); DataTable dt = Select("FingerID=" + FingerId + " AND IsActive=1"); if (dt.Rows.Count > 0) { vo = b.ConvertObjWithImage(dt.Rows[0], new EmployeeVO()) as EmployeeVO; } return(vo); }
public int Create(EmployeeVO vo) { int id = 0; if (!dao.isExist(vo.Id.ToString())) { vo.CreatedDate = DateTime.Now; vo.LastModified = DateTime.Now; id = dao.Insert(vo); } else { // vo.CreatedDate = DateTime.Now; // vo.LastModified = DateTime.Now; // id = dao.Update(vo); } return(id); }
public int Insert(EmployeeVO vo) { int lastInsertId = 0; try { lastInsertId = b.InsertWithImage("Employee", b.ConvertColName(vo), b.ConvertValueList(vo), vo.EmpPhoto); if (lastInsertId > 0) { //MessageBox.Show("Success"); } //b.Insert("Employee", b.ConvertColName(vo), b.ConvertValueListNullable(vo)); } catch (SqlException Sql) { MessageBox.Show("Insert Error"); throw Sql; } return(lastInsertId); }