Esempio n. 1
0
        internal CommandDownloadMappingEntity GetCommandDownloadMappingById(int Id)
        {
            CommandDownloadMappingEntity results = new CommandDownloadMappingEntity();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetCommandDownloadMappingById";
                sproc.StoredProceduresParameter.Add(GetParam("@Id", Id.ToString(), SQLServerDatatype.IntDataType));
                DataTable dt;
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    CommandDownloadMappingAdapter ta = new CommandDownloadMappingAdapter();
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = ta.AdaptItem(rw, dt);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }
Esempio n. 2
0
        internal List <CommandDownloadMappingEntity> GetCommandDownloadMapping()
        {
            List <CommandDownloadMappingEntity> results = new List <CommandDownloadMappingEntity>();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetCommandDownloadMapping";
                string    outParam = "";
                DataTable dt;
                dt = sql.ExecuteDataTableWithOutputParam(CommandType.StoredProcedure, sproc, out outParam, "");

                if (dt != null && dt.Rows.Count > 0)
                {
                    results = new CommandDownloadMappingAdapter().Adapt(dt);
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }