public CompanyDataObject GetData(string companyTypeCode, Func <SqlDataReader, CompanyDataObject> companyDataMapper) { SqlQueryParameter sqlQueryParameter = new SqlQueryParameter { ParameterName = "CompanyTypeCode", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = companyTypeCode }; return(companyDataMapper(CommandTypeManager.ExecuteReader("CompanyDataFetch", sqlQueryParameter))); }
public DashboardDataDto GetData(int?userId, Func <SqlDataReader, DashboardDataDto> dashboardDtoMapper) { List <SqlQueryParameter> sqlQueryParameters = new List <SqlQueryParameter>(); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "UserId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Integer, ParameterValue = userId }); return(dashboardDtoMapper(CommandTypeManager.ExecuteReader("DashboardDataFetch", sqlQueryParameters.ToArray()))); }
public Response <AccountDto> PasswordResetRequest(string username, Func <SqlDataReader, AccountDto> accountDtoMapper) { DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountPasswordResetRequest", new SqlQueryParameter { ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = username }, new SqlQueryParameter { ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000 }); return(dbResponse.ToReponse <AccountDto>(accountDtoMapper)); }
public Response <AccountDto> PasswordReset(ResetPasswordDto resetPasswordDto, Func <SqlDataReader, AccountDto> accountDtoMapper) { DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountPasswordReset", new SqlQueryParameter { ParameterName = "Password ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = resetPasswordDto.Password }, new SqlQueryParameter { ParameterName = "ForgotPasswordKey ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Guid, ParameterValue = resetPasswordDto.ForgotPasswordKey }, new SqlQueryParameter { ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000 }); return(dbResponse.ToReponse <AccountDto>(accountDtoMapper)); }
public Response <UserInformationDto> Login(string username, string password, Func <SqlDataReader, UserInformationDto> userInformationMapper) { DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountLogin", new SqlQueryParameter { ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = username }, new SqlQueryParameter { ParameterName = "Password", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = password }, new SqlQueryParameter { ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000 }); return(dbResponse.ToReponse <UserInformationDto>(userInformationMapper)); }
public Result <CompanySummaryDto> Get(CompanySearchFilter companySearchFilter, Func <SqlDataReader, Result <CompanySummaryDto> > companyMapper) { List <SqlQueryParameter> sqlQueryParameters = GetPagedDataParameters(companySearchFilter.PageData); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "UserId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Integer, ParameterValue = companySearchFilter.UserId }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "OrganisationId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Integer, ParameterValue = companySearchFilter.OrganisationId }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "SearchText", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = companySearchFilter.SearchText }); return(companyMapper(CommandTypeManager.ExecuteReader("CompaniesFetch", sqlQueryParameters.ToArray()))); }
public Response <UserInformationDto> ChangePassword(ChangePasswordDto changePasswordDto, Func <SqlDataReader, UserInformationDto> userInformationMapper) { DbResponse dbResponse = CommandTypeManager.ExecuteReaderWithValidation("AccountChangePassword", new SqlQueryParameter { ParameterName = "UserName ", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.Username }, new SqlQueryParameter { ParameterName = "OldPassword", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.OldPassword }, new SqlQueryParameter { ParameterName = "NewPassword", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = changePasswordDto.Password }, new SqlQueryParameter { ParameterName = "ValidationMessages", ParameterDirection = DbParameterDirection.Output, ParamentType = CodeParameterType.String, ParameterSize = 8000 }); return(dbResponse.ToReponse <UserInformationDto>(userInformationMapper)); }
public Result <CompanySummaryDto> GetApp(CompanyAppSearchFilter companyAppSearchFilter, Func <SqlDataReader, Result <CompanySummaryDto> > companyMapper) { List <SqlQueryParameter> sqlQueryParameters = GetPagedDataParameters(companyAppSearchFilter.PageData); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "Latitude", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Decimal, ParameterValue = companyAppSearchFilter.Latitude }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "Longitude", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Decimal, ParameterValue = companyAppSearchFilter.Longitude }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "SubCategoryId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.Integer, ParameterValue = companyAppSearchFilter.SubCategoryId }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "DeviceId", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = companyAppSearchFilter.DeviceId }); sqlQueryParameters.Add(new SqlQueryParameter { ParameterName = "SearchText", ParameterDirection = DbParameterDirection.Input, ParamentType = CodeParameterType.String, ParameterSize = 100, ParameterValue = companyAppSearchFilter.SearchText }); return(companyMapper(CommandTypeManager.ExecuteReader("CompaniesAppFetch", sqlQueryParameters.ToArray()))); }