public Cross GetRow() { QueryBySingleRequest request = new QueryBySingleRequest(); QueryBySingleResponse <Cross> response = new QueryBySingle <Cross>().Get(request, ReposityEntityFactory.Items[Flag]); return(response.Row); }
public int GetCount(QueryBySingleRequest request, ReposityEntity re) { string sql = Common.GetSqlPlusSort(request, re.Items[ReposityEntity.FalgQueryCountEntity]); IList <SqlParams> sqlparams = Common.GetSqlParams(request); object obj = SQLHelper.ExecuteScalar(re.OwnerService, sql, sqlparams); return(int.Parse(obj.ToString())); }
public static string GetSqlPlusSort(QueryBySingleRequest request, string sql) { StringBuilder sqlsort = new StringBuilder(); foreach (var s in request.ParamSort) { sqlsort.AppendFormat("{0} {1},", s.Key, s.Value); } if (sqlsort.Length > 0) sqlsort.Length--; sql = string.Format(sql, request.ParamPlus, sqlsort.ToString()); return sql; }
public int GetCount(QueryBySingleRequest request) { if (string.IsNullOrWhiteSpace(request.Guid) || !ReposityEntityFactory.Items.ContainsKey(request.Guid) ) { throw new Exception("Error: requestGuid is null or is not exists! "); } return(this.GetCount(request, ReposityEntityFactory.Items[request.Guid])); }
public QueryBySingleResponse <TDto> Get(QueryBySingleRequest request, ReposityEntity re) { string sql = Common.GetSqlPlusSort(request, re.Items[ReposityEntity.FalgQuerySingleEntity]); IList <SqlParams> sqlparams = Common.GetSqlParams(request); QueryBySingleResponse <TDto> result = new QueryBySingleResponse <TDto>() { Row = SQLHelper.Get <TDto>(SQLHelper.ExecuteIDataReader(re.OwnerService, sql, sqlparams)) }; return(result); }
public static string GetSqlPlusSort(QueryBySingleRequest request, string sql) { StringBuilder sqlsort = new StringBuilder(); foreach (var s in request.ParamSort) { sqlsort.AppendFormat("{0} {1},", s.Key, s.Value); } if (sqlsort.Length > 0) { sqlsort.Length--; } sql = string.Format(sql, request.ParamPlus, sqlsort.ToString()); return(sql); }
public ExamQuestion GetRow(string ExamPaper) { QueryBySingleRequest request = new QueryBySingleRequest() { Params = new List <RequestParameter>() { new RequestParameter() { Name = "@ExamPaper", Value = ExamPaper, Type = "string", } }, }; QueryBySingleResponse <ExamQuestion> response = new QueryBySingle <ExamQuestion>().Get(request, ReposityEntityFactory.Items[Flag]); return(response.Row); }
public int GetCount(QueryBySingleRequest request) { return(new QueryByCount().GetCount(request, SRRDBMS.ReposityEntityFactory.Items[Flag])); }
public QueryBySingleResponse <User> Get(QueryBySingleRequest request) { return(new QueryBySingle <User>().Get(request, SRRDBMS.ReposityEntityFactory.Items[Flag])); }
public int GetCount(QueryBySingleRequest request) { return(crh.GetCount(request)); }
public QueryBySingleResponse <CustomerRegister> Get(QueryBySingleRequest request) { return(crh.Get(request)); }
public QueryBySingleResponse <User> Get(QueryBySingleRequest request) { return(new QueryBySingle <User>().Get(request)); }
public QueryBySingleResponse <CustomerRegister> Get(QueryBySingleRequest request) { return(new QueryBySingle <CustomerRegister>().Get(request, ReposityEntityFactory.Items[Flag])); }
public QueryBySingleResponse <Workflow> Get(QueryBySingleRequest request) { return(new QueryBySingle <Workflow>().Get(request)); }
public int GetCount(QueryBySingleRequest request) { return(new QueryByCount().GetCount(request)); }