public bool SelectEmployee() { bool blnExist = false; SqlDataReader dr = SqlHelper.ExecuteReader(gstrCnn, "sp_Employee_SelectRow"); while (dr.Read()) { _IdEmployee = Convert.ToInt32(dr[0]); CodEmployee = dr[1].ToString(); Name = dr[2].ToString(); LastName = dr[3].ToString(); DateStart = Convert.ToDateTime(dr[4]); State = Convert.ToBoolean(dr[5]); IdSociety= Convert.ToInt32(dr[6]); IdEmployeeCharge = Convert.ToInt32(dr[7]); EmployeePicture = (dr[8]); gstrUserName = dr[9].ToString(); blnExist = true; } return blnExist; } #Region private int _IdEmployee; public int IdEmployee { get { return _IdEmployee; } } public string CodEmployee { get; set; } public string Name { get; set; } public string LastName { get; set; } public DateTime DateStart { get; set; } public bool State { get; set; } public int IdSociety{ get; set; } public int IdEmployeeCharge { get; set; } public PictureBox FotoServidor { get; set; } #endregion }
MemoryStream ms = new MemoryStream((byte[]) dr[8]); EmployeePicture.Image = Image.FromStream(ms);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)