Пример #1
0
        internal MinConfidenceOverrideEntity GetAllMinConfidenceOverrideByID(int MinCCId)
        {
            MinConfidenceOverrideEntity results = new MinConfidenceOverrideEntity();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetMinConfidenceOverrideByID";
                sproc.StoredProceduresParameter.Add(GetParam("@id", MinCCId.ToString(), SQLServerDatatype.IntDataType));
                DataTable dt;
                dt = sql.ExecuteDataTable(CommandType.StoredProcedure, sproc);
                if (dt != null && dt.Rows.Count > 0)
                {
                    MinConfidenceOverrideAdapter adta = new MinConfidenceOverrideAdapter();
                    foreach (DataRow rw in dt.Rows)
                    {
                        results = adta.AdaptItem(rw, dt);
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }
Пример #2
0
        public List <MinConfidenceOverrideEntity> GetAllMinConfidenceOverrideListPaging(string LOBTag, int SortOrder, int PageNumber, int PageSize, out int TotalCount)
        {
            TotalCount = 0;
            List <MinConfidenceOverrideEntity> results = new List <MinConfidenceOverrideEntity>();

            try
            {
                StoredProcedureEntity sproc = new StoredProcedureEntity();
                sproc.StoredProcedureName = "dnb.GetMinConfidenceOverrideListPaging";
                sproc.StoredProceduresParameter.Add(GetParam("@SortOrder", SortOrder.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@PageNumber", PageNumber.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@PageSize", PageSize.ToString(), SQLServerDatatype.IntDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@LOBTag", string.IsNullOrEmpty(LOBTag) ? null : Convert.ToString(LOBTag), SQLServerDatatype.VarcharDataType));
                sproc.StoredProceduresParameter.Add(GetParam("@TotalRecords", TotalCount.ToString(), SQLServerDatatype.IntDataType, ParameterDirection.Output));

                string    outParam = "";
                DataTable dt;
                dt = sql.ExecuteDataTableWithOutputParam(CommandType.StoredProcedure, sproc, out outParam);

                if (dt != null && dt.Rows.Count > 0)
                {
                    results = new MinConfidenceOverrideAdapter().Adapt(dt);
                }
                TotalCount = Convert.ToInt32(outParam);
            }
            catch (Exception)
            {
                throw;
            }
            return(results);
        }