Exemplo n.º 1
0
        internal DPMFTPConfigurationEntity GetDPMFTPConfigurationById(int Id)
        {
            DPMFTPConfigurationEntity results = new DPMFTPConfigurationEntity();

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

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.DPMGetFTPConfiguration";
                DataTable dt;
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc, "");
                if (dt != null && dt.Rows.Count > 0)
                {
                    DPMFTPConfigurationAdapter ta = new DPMFTPConfigurationAdapter();
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = ta.Adapt(dt);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }