Ejemplo n.º 1
0
        public Boolean LoadImage(int newUID, int newHhId)
        {
            initSigFields(newUID, newHhId);
            sqlLoadCmd.Parameters["@UID"].Value = newUID;
            sqlConn.Open();
            SqlDataReader reader = sqlLoadCmd.ExecuteReader();
            int           count  = 0;

            while (reader.Read())
            {
                sigUID  = Convert.ToInt32(reader["UID"]);
                sigHHId = Convert.ToInt32(reader["HhID"]);
                sigDate = Convert.ToDateTime(reader["SigDate"]);
                docPath = reader["DocPath"].ToString();
                byte[] imgData = (byte[])reader["SigImage"];
                sigImage     = CCFBGlobal.byteArrayToImage(imgData);
                sigStr       = reader["SigString"].ToString();
                sigCreated   = Convert.ToDateTime(reader["Created"]);
                sigCreatedBy = reader["CreatedBy"].ToString();
                count++;
            }
            haveSig = (count == 1);
            sqlConn.Close();
            return(haveSig);
        }