Exemple #1
0
        public List <DM_DVQLY> DM_DVQLYandLEVER_BYDV(string Ma_dv)
        {
            List <DM_DVQLY> dm_dvqly = new List <DM_DVQLY>();
            DbDataReader    reader   = null;
            DbConnection    conn     = _DbHelper.CreateConnection(Common.ConnectionString);

            conn.Open();
            try
            {
                List <DbParameter> para = new List <DbParameter>();

                para.Add(_DbHelper.CreateParameter("MA_DVIQLY", Ma_dv, false));
                reader = _DbHelper.ExecuteReader(conn, Common.DatabaseSchema + "[DM_DVQLYandLEVER_BYDV]", para.ToArray());
                if (reader.HasRows)
                {
                    DM_DVQLYDataAccess.SetListDM_DVQLYInfo(ref reader, ref dm_dvqly);
                }
                return(dm_dvqly);
            }
            catch (Exception ex)
            {
                throw new Exception(String.Format(" DM_DVQLYandLEVER_BYDV.SelectAll: {0}", ex.Message));
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
                conn.Close();
            }
        }
        public List <DM_DVQLY> Select_DVI_Cha_ByChild()
        {
            List <DM_DVQLY> dm_dvqly = new List <DM_DVQLY>();
            DbDataReader    reader   = null;
            DbConnection    conn     = _DbHelper.CreateConnection(Common.ConnectionString);

            conn.Open();
            try
            {
                reader = _DbHelper.ExecuteReader(conn, Common.DatabaseSchema + "[Select_DVI_Cha_ByChild]", (DbParameter[])null);
                if (reader.HasRows)
                {
                    DM_DVQLYDataAccess.SetListDM_DVQLYInfo(ref reader, ref dm_dvqly);
                }
                return(dm_dvqly);
            }
            catch (Exception ex)
            {
                throw new Exception(String.Format(" DM_DVQLYDataAccess.SelectAll: {0}", ex.Message));
            }
            finally
            {
                if (reader != null)
                {
                    reader.Close();
                }
                conn.Close();
            }
        }