public dynamic AddVentilationEquipment(List <VentilationMonitor> veqObj)
        {
            var dynamicParameters = new DynamicParameters();

            dynamicParameters.Add("@Objects", veqObj.AsTableValuedParameter("dbo.VentilationMonitorMain", new[]
            {
                "Id",
                "Unit",
                "DepartmentName",
                "Quantity"
            }));


            var data = _dapperManager.QueryAsync(sql: "InsertVentilationMonitorMain", param: dynamicParameters, commandType: CommandType.StoredProcedure);

            return(data.Result);
        }
Ejemplo n.º 2
0
        public async Task <Users> GetLoginUser(Users entity)
        {
            var result = await _dapperManager.QueryAsync <Users>("SELECT * from Users WHERE UserName=@UserName OR ContactNumber=@UserName OR EmailAddress=@UserName", new { entity.UserName });

            if (result.Count() == 0)
            {
                return(null);
            }

            string hashPassword = Web.Repositories.Utitlities.Security.GetMd5Sum(entity.Password);
            var    loginUser    = result.Where(a => a.Password.Trim() == hashPassword.Trim());

            if (loginUser.Count() == 0)
            {
                return(null);
            }

            return(loginUser.FirstOrDefault());
        }
Ejemplo n.º 3
0
 public async Task <IEnumerable <DesignationDto> > GetAllDesignationAsync()
 {
     return(await _dapperManager.QueryAsync <DesignationDto>("SELECT * FROM Designation"));
 }
Ejemplo n.º 4
0
        public async Task <IEnumerable <RoleDto> > GetActiveRoleAsync()
        {
            var roles = await _dapperManager.QueryAsync <RoleDto>("SELECT * FROM Role WHERE Status=1");

            return(roles);
        }
Ejemplo n.º 5
0
 public async Task <IEnumerable <CustomerQueryDto> > GetAllQueryAsync()
 {
     return(await _dapperManager.QueryAsync <CustomerQueryDto>("SELECT * FROM CustomerQuery"));
 }
Ejemplo n.º 6
0
 public async Task <IEnumerable <ProductDto> > GetAllProductAsync()
 {
     return(await _dapperManager.QueryAsync <ProductDto>("SELECT * FROM ProductView"));
 }
Ejemplo n.º 7
0
 public async Task <IEnumerable <UnitDto> > GetAllUnitAsync()
 {
     return(await _dapperManager.QueryAsync <UnitDto>("SELECT * FROM Unit"));
 }
Ejemplo n.º 8
0
        public async Task <IEnumerable <MenusDto> > GetMenusAsync()
        {
            var result = await _dapperManager.QueryAsync <MenusDto>("SELECT * from MenuView");

            return(result);
        }
Ejemplo n.º 9
0
 public async Task <IEnumerable <FiscalYearDto> > GetAllFiscalYearAsync()
 {
     return(await _dapperManager.QueryAsync <FiscalYearDto>("SELECT * FROM FiscalYear"));
 }
Ejemplo n.º 10
0
 public async Task <IEnumerable <RoleDto> > GetAllRolesAsync()
 {
     return(await _dapperManager.QueryAsync <RoleDto>("SELECT * FROM Role"));
 }
Ejemplo n.º 11
0
        public async Task <IEnumerable <StaffsDto> > GetStaffListAsync()
        {
            var dto = await _dapperManager.QueryAsync <StaffsDto>("SELECT * FROM StaffsView");

            return(dto);
        }
        public IEnumerable <dynamic> GetVertexesDapper()
        {
            var data = _dapperManager.QueryAsync(sql: "usp_GetVertexes", commandType: CommandType.StoredProcedure);

            return(data.Result);
        }
Ejemplo n.º 13
0
 public async Task <IEnumerable <AccountHeadDto> > GetAllAccountHeadAsync()
 {
     return(await _dapperManager.QueryAsync <AccountHeadDto>("SELECT * FROM AccountHead"));
 }
Ejemplo n.º 14
0
 public async Task <IEnumerable <SupplierDto> > GetAllSupplierAsync()
 {
     return(await _dapperManager.QueryAsync <SupplierDto>("SELECT * FROM Supplier"));
 }
Ejemplo n.º 15
0
 public async Task <IEnumerable <DepartmentDto> > GetAllDepartmentAsync()
 {
     return(await _dapperManager.QueryAsync <DepartmentDto>("SELECT * FROM Department"));
 }