Exemplo n.º 1
0
        private bool IsZYBrxxValid(string idcardno, string name, out string msg)
        {
            bool result = false;

            msg = "";
            OracleConnection connection  = new OracleConnection(WebConfigParameter.ConnectionHisString);
            OracleDataReader dr          = null;
            string           inpatientno = "";

            try
            {
                bool _flag = false;

                string findId1 = _builder.GetIsZYBrxxValid(idcardno, name, out _flag, out msg);
                dr = DbHelperOra.ExecuteReader(findId1, connection);

                if (dr.HasRows)
                {
                    if (dr.Read())
                    {
                        inpatientno = !dr.IsDBNull(0) ? dr.GetString(0) : "";
                        result      = true;
                    }
                }
                else
                {
                    msg    = "未找到住院号码!";
                    result = false;
                }
            }
            catch (Exception ex)
            {
                msg = ex.Message;
                return(false);
            }
            finally
            {
                if (null != dr)
                {
                    dr.Close();
                }
                connection.Close();
            }

            return(result);
        }