├── .gitattributes ├── .github ├── .github │ └── FUNDING.yml └── FUNDING.yml ├── .gitignore ├── Images └── banner.png ├── LICENSE ├── README.md ├── WebGYM ├── WebGYM.Concrete │ ├── DatabaseContext.cs │ ├── GenerateRecepitConcrete.cs │ ├── MemberRegistrationConcrete.cs │ ├── PaymentDetailsConcrete.cs │ ├── PeriodMasterConcrete.cs │ ├── PlanMasterConcrete.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RenewalConcrete.cs │ ├── ReportsMaster.cs │ ├── RoleConcrete.cs │ ├── SchemeMasterConcrete.cs │ ├── UsersConcrete.cs │ ├── UsersInRolesConcrete.cs │ ├── WebGYM.Concrete.csproj │ ├── app.config │ └── packages.config ├── WebGYM.Interface │ ├── IGenerateRecepit.cs │ ├── IMemberRegistration.cs │ ├── IPaymentDetails.cs │ ├── IPeriodMaster.cs │ ├── IPlanMaster.cs │ ├── IRenewal.cs │ ├── IReports.cs │ ├── IRole.cs │ ├── ISchemeMaster.cs │ ├── IUsers.cs │ ├── IUsersInRoles.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ └── WebGYM.Interface.csproj ├── WebGYM.Models │ ├── DynamicExtensions.cs │ ├── MemberRegistration.cs │ ├── PaymentDetails.cs │ ├── PeriodTB.cs │ ├── PlanMaster.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── QueryParameters.cs │ ├── QueryParametersExtensions.cs │ ├── Role.cs │ ├── SchemeMaster.cs │ ├── Users.cs │ ├── UsersInRoles.cs │ ├── WebGYM.Models.csproj │ └── packages.config ├── WebGYM.ViewModels │ ├── AmountRequestViewModel.cs │ ├── AssignRolesViewModel.cs │ ├── GenerateRecepitRequestModel.cs │ ├── GenerateRecepitViewModel.cs │ ├── LoginResponse.cs │ ├── LoginViewModel.cs │ ├── MemberDetailsReportViewModel.cs │ ├── MemberRegistrationGridModel.cs │ ├── MemberRegistrationViewModel.cs │ ├── MemberRequest.cs │ ├── MonthWiseReportViewModel.cs │ ├── MonthwiseRequestModel.cs │ ├── PaymentDetailsViewModel.cs │ ├── PlanMasterViewModel.cs │ ├── Properties │ │ └── AssemblyInfo.cs │ ├── RenewalReportRequestModel.cs │ ├── RenewalReportViewModel.cs │ ├── RenewalViewModel.cs │ ├── RoleViewModel.cs │ ├── SchemeMasterViewModel.cs │ ├── UsersViewModel.cs │ ├── WebGYM.ViewModels.csproj │ ├── YearWiseRequestModel.cs │ └── YearwiseReportViewModel.cs ├── WebGYM.sln └── WebGYM │ ├── Common │ ├── CustomExceptionFilterAttribute.cs │ └── Generate.cs │ ├── Controllers │ ├── AllActivePlanMasterController.cs │ ├── AssignRolesController.cs │ ├── AuthenticateController.cs │ ├── CreateRoleController.cs │ ├── GenerateRecepitController.cs │ ├── GetMemberNoController.cs │ ├── GetTotalAmountController.cs │ ├── HomeController.cs │ ├── MemberDetailsReportController.cs │ ├── MonthwiseReportController.cs │ ├── PaymentController.cs │ ├── PeriodController.cs │ ├── PlanMasterController.cs │ ├── RegisterMemberController.cs │ ├── RemoveRoleController.cs │ ├── RenewalController.cs │ ├── RenewalDetailsController.cs │ ├── RenewalReportController.cs │ ├── SchemeController.cs │ ├── SchemeDropdownController.cs │ ├── UserController.cs │ └── YearwiseReportController.cs │ ├── Mappings │ └── MappingProfile.cs │ ├── Models │ ├── AppSettings.cs │ └── ErrorViewModel.cs │ ├── Program.cs │ ├── Properties │ └── launchSettings.json │ ├── Startup.cs │ ├── Views │ ├── Home │ │ ├── About.cshtml │ │ ├── Contact.cshtml │ │ ├── Index.cshtml │ │ └── Privacy.cshtml │ ├── Shared │ │ ├── Error.cshtml │ │ ├── _CookieConsentPartial.cshtml │ │ ├── _Layout.cshtml │ │ └── _ValidationScriptsPartial.cshtml │ ├── _ViewImports.cshtml │ └── _ViewStart.cshtml │ ├── WebGYM.csproj │ ├── appsettings.Development.json │ ├── appsettings.json │ └── wwwroot │ ├── ErrorLog │ ├── Log_28-December-2018.txt │ └── Log_29-December-2018.txt │ ├── css │ ├── site.css │ └── site.min.css │ ├── favicon.ico │ ├── images │ ├── banner1.svg │ ├── banner2.svg │ └── banner3.svg │ ├── js │ ├── site.js │ └── site.min.js │ └── lib │ ├── bootstrap │ ├── .bower.json │ ├── LICENSE │ └── dist │ │ ├── css │ │ ├── bootstrap-theme.css │ │ ├── bootstrap-theme.css.map │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.min.css.map │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ └── npm.js │ ├── jquery-validation-unobtrusive │ ├── .bower.json │ ├── LICENSE.txt │ ├── jquery.validate.unobtrusive.js │ └── jquery.validate.unobtrusive.min.js │ ├── jquery-validation │ ├── .bower.json │ ├── LICENSE.md │ └── dist │ │ ├── additional-methods.js │ │ ├── additional-methods.min.js │ │ ├── jquery.validate.js │ │ └── jquery.validate.min.js │ └── jquery │ ├── .bower.json │ ├── LICENSE.txt │ └── dist │ ├── jquery.js │ ├── jquery.min.js │ └── jquery.min.map └── gym-project ├── .editorconfig ├── README.md ├── angular.json ├── e2e ├── protractor.conf.js ├── src │ ├── app.e2e-spec.ts │ └── app.po.ts └── tsconfig.e2e.json ├── package-lock.json ├── package.json ├── src ├── app │ ├── AdminDashboard │ │ ├── app.AdminDashboardComponent.html │ │ └── app.AdminDashboardComponent.ts │ ├── AssignRole │ │ ├── Models │ │ │ ├── AssignRemoveModel.ts │ │ │ └── AssignRolesViewModel.ts │ │ ├── Services │ │ │ └── app.AssignandRemoveRole.Service.ts │ │ ├── app.AllAssignRole.component.ts │ │ ├── app.AllAssignedRoles.html │ │ ├── app.AssignRole.component.ts │ │ └── app.AssignandRemoveRole.html │ ├── AuthGuard │ │ ├── AdminAuthGuardService.ts │ │ └── UserAuthGuardService.ts │ ├── Content │ │ ├── dist │ │ │ ├── css │ │ │ │ ├── sb-admin-2.css │ │ │ │ └── sb-admin-2.min.css │ │ │ └── js │ │ │ │ ├── sb-admin-2.js │ │ │ │ └── sb-admin-2.min.js │ │ └── vendor │ │ │ ├── bootstrap-social │ │ │ ├── bootstrap-social.css │ │ │ ├── bootstrap-social.less │ │ │ └── bootstrap-social.scss │ │ │ ├── bootstrap │ │ │ ├── css │ │ │ │ ├── bootstrap.css │ │ │ │ └── bootstrap.min.css │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ └── js │ │ │ │ ├── bootstrap.js │ │ │ │ └── bootstrap.min.js │ │ │ ├── datatables-plugins │ │ │ ├── dataTables.bootstrap.css │ │ │ ├── dataTables.bootstrap.js │ │ │ ├── dataTables.bootstrap.min.js │ │ │ └── index.html │ │ │ ├── datatables-responsive │ │ │ ├── dataTables.responsive.css │ │ │ ├── dataTables.responsive.js │ │ │ └── dataTables.responsive.scss │ │ │ ├── datatables │ │ │ ├── css │ │ │ │ ├── dataTables.bootstrap.css │ │ │ │ ├── dataTables.bootstrap.min.css │ │ │ │ ├── dataTables.bootstrap4.css │ │ │ │ ├── dataTables.bootstrap4.min.css │ │ │ │ ├── dataTables.foundation.css │ │ │ │ ├── dataTables.foundation.min.css │ │ │ │ ├── dataTables.jqueryui.css │ │ │ │ ├── dataTables.jqueryui.min.css │ │ │ │ ├── dataTables.material.css │ │ │ │ ├── dataTables.material.min.css │ │ │ │ ├── dataTables.semanticui.css │ │ │ │ ├── dataTables.semanticui.min.css │ │ │ │ ├── dataTables.uikit.css │ │ │ │ ├── dataTables.uikit.min.css │ │ │ │ ├── jquery.dataTables.css │ │ │ │ ├── jquery.dataTables.min.css │ │ │ │ └── jquery.dataTables_themeroller.css │ │ │ ├── images │ │ │ │ ├── Sorting icons.psd │ │ │ │ ├── favicon.ico │ │ │ │ ├── sort_asc.png │ │ │ │ ├── sort_asc_disabled.png │ │ │ │ ├── sort_both.png │ │ │ │ ├── sort_desc.png │ │ │ │ └── sort_desc_disabled.png │ │ │ └── js │ │ │ │ ├── dataTables.bootstrap.js │ │ │ │ ├── dataTables.bootstrap.min.js │ │ │ │ ├── dataTables.bootstrap4.js │ │ │ │ ├── dataTables.bootstrap4.min.js │ │ │ │ ├── dataTables.foundation.js │ │ │ │ ├── dataTables.foundation.min.js │ │ │ │ ├── dataTables.jqueryui.js │ │ │ │ ├── dataTables.jqueryui.min.js │ │ │ │ ├── dataTables.material.js │ │ │ │ ├── dataTables.material.min.js │ │ │ │ ├── dataTables.semanticui.js │ │ │ │ ├── dataTables.semanticui.min.js │ │ │ │ ├── dataTables.uikit.js │ │ │ │ ├── dataTables.uikit.min.js │ │ │ │ ├── jquery.dataTables.js │ │ │ │ ├── jquery.dataTables.min.js │ │ │ │ └── jquery.js │ │ │ ├── flot-tooltip │ │ │ ├── jquery.flot.tooltip.js │ │ │ ├── jquery.flot.tooltip.min.js │ │ │ └── jquery.flot.tooltip.source.js │ │ │ ├── flot │ │ │ ├── excanvas.js │ │ │ ├── excanvas.min.js │ │ │ ├── jquery.colorhelpers.js │ │ │ ├── jquery.flot.canvas.js │ │ │ ├── jquery.flot.categories.js │ │ │ ├── jquery.flot.crosshair.js │ │ │ ├── jquery.flot.errorbars.js │ │ │ ├── jquery.flot.fillbetween.js │ │ │ ├── jquery.flot.image.js │ │ │ ├── jquery.flot.js │ │ │ ├── jquery.flot.navigate.js │ │ │ ├── jquery.flot.pie.js │ │ │ ├── jquery.flot.resize.js │ │ │ ├── jquery.flot.selection.js │ │ │ ├── jquery.flot.stack.js │ │ │ ├── jquery.flot.symbol.js │ │ │ ├── jquery.flot.threshold.js │ │ │ ├── jquery.flot.time.js │ │ │ └── jquery.js │ │ │ ├── font-awesome │ │ │ ├── HELP-US-OUT.txt │ │ │ ├── css │ │ │ │ ├── font-awesome.css │ │ │ │ ├── font-awesome.css.map │ │ │ │ └── font-awesome.min.css │ │ │ ├── fonts │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.svg │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ ├── less │ │ │ │ ├── animated.less │ │ │ │ ├── bordered-pulled.less │ │ │ │ ├── core.less │ │ │ │ ├── extras.less │ │ │ │ ├── fixed-width.less │ │ │ │ ├── font-awesome.less │ │ │ │ ├── icons.less │ │ │ │ ├── larger.less │ │ │ │ ├── list.less │ │ │ │ ├── mixins.less │ │ │ │ ├── path.less │ │ │ │ ├── rotated-flipped.less │ │ │ │ ├── screen-reader.less │ │ │ │ ├── spinning.less │ │ │ │ ├── stacked.less │ │ │ │ └── variables.less │ │ │ └── scss │ │ │ │ ├── _animated.scss │ │ │ │ ├── _bordered-pulled.scss │ │ │ │ ├── _core.scss │ │ │ │ ├── _extras.scss │ │ │ │ ├── _fixed-width.scss │ │ │ │ ├── _icons.scss │ │ │ │ ├── _larger.scss │ │ │ │ ├── _list.scss │ │ │ │ ├── _mixins.scss │ │ │ │ ├── _path.scss │ │ │ │ ├── _rotated-flipped.scss │ │ │ │ ├── _screen-reader.scss │ │ │ │ ├── _spinning.scss │ │ │ │ ├── _stacked.scss │ │ │ │ ├── _variables.scss │ │ │ │ └── font-awesome.scss │ │ │ ├── jquery │ │ │ ├── jquery.js │ │ │ └── jquery.min.js │ │ │ ├── metisMenu │ │ │ ├── metisMenu.css │ │ │ ├── metisMenu.js │ │ │ ├── metisMenu.min.css │ │ │ └── metisMenu.min.js │ │ │ ├── morrisjs │ │ │ ├── morris.css │ │ │ ├── morris.js │ │ │ └── morris.min.js │ │ │ └── raphael │ │ │ ├── raphael.js │ │ │ └── raphael.min.js │ ├── CreateUsers │ │ ├── Models │ │ │ ├── app.UserDropdownModel.ts │ │ │ └── app.UserModel.ts │ │ ├── Services │ │ │ └── app.UserRegistration.Service.ts │ │ ├── app.AllUserRegistration.component.ts │ │ ├── app.AllUserRegistration.html │ │ ├── app.EditUserRegistration.component.ts │ │ ├── app.EditUserRegistration.html │ │ ├── app.UserRegistration.component.ts │ │ └── app.UserRegistration.html │ ├── Login │ │ ├── Models │ │ │ └── app.LoginModel.ts │ │ ├── Services │ │ │ └── app.LoginService.ts │ │ ├── app.AdminLogout.Component.ts │ │ ├── app.LoginComponent.ts │ │ ├── app.UserLogout.Component.ts │ │ └── app.login.html │ ├── MemberRegistration │ │ ├── List │ │ │ ├── Memberlist.component.html │ │ │ ├── app.MemberListComponent .ts │ │ │ ├── app.MemberViewComponent.html │ │ │ └── app.MemberViewComponent.ts │ │ ├── Models │ │ │ ├── app.MemberRegistrationGridModel.ts │ │ │ └── app.MemberRegistrationModel.ts │ │ ├── Services │ │ │ └── app.MemberRegistration.Service.ts │ │ ├── app.AllMemberRegistration.component.ts │ │ ├── app.AllMemberRegistration.html │ │ ├── app.EditMemberRegistration.component.ts │ │ ├── app.EditMemberRegistration.html │ │ ├── app.MemberRegistration.component.ts │ │ ├── app.MemberRegistration.html │ │ └── app.memberComponent.css │ ├── Payment │ │ ├── List │ │ │ ├── app.PaymentListComponent.ts │ │ │ ├── app.PaymentOverviewComponent.ts │ │ │ ├── app.PaymentViewComponent.html │ │ │ └── app.Paymentlist.component.html │ │ ├── Models │ │ │ └── app.PaymentDetailsModel.ts │ │ └── Services │ │ │ └── app.PaymentDetails.Service.ts │ ├── PeriodMaster │ │ ├── Models │ │ │ └── app.PeriodModel.ts │ │ └── Services │ │ │ └── app.Period.Service.ts │ ├── PlanMaster │ │ ├── Models │ │ │ ├── app.ActivePlanModel.ts │ │ │ ├── app.PlanMasterModel.ts │ │ │ └── app.PlanMasterViewModel.ts │ │ ├── Services │ │ │ └── app.planmaster.service.ts │ │ ├── app.EditPlan.component.html │ │ ├── app.EditPlan.component.ts │ │ ├── app.allplanmaster.component.html │ │ ├── app.allplanmaster.component.ts │ │ ├── app.planmaster.component.html │ │ └── app.planmaster.component.ts │ ├── Recepit │ │ ├── Models │ │ │ ├── app.GenerateRecepitRequestModel.ts │ │ │ └── app.GenerateRecepitViewModel.ts │ │ ├── Recepit.html │ │ ├── Services │ │ │ └── app.GenerateRecepit.Service.ts │ │ └── app.generateRecepit.Component.ts │ ├── Renewal │ │ ├── Models │ │ │ ├── app.RenewalModel.ts │ │ │ ├── app.RequestMemberModel.ts │ │ │ ├── app.RequestMemberNoModel.ts │ │ │ └── app.ResponseMemberModel.ts │ │ ├── Services │ │ │ └── app.renewal.Service.ts │ │ ├── app.Renewal.Component.ts │ │ └── app.renewalcomponent.html │ ├── Reports │ │ ├── Models │ │ │ ├── app.MemberDetailsReportViewModel.ts │ │ │ ├── app.MonthModel.ts │ │ │ ├── app.MonthWiseRequestModel.ts │ │ │ ├── app.MonthWiseResponseModel.ts │ │ │ ├── app.RenewalReportViewModel.ts │ │ │ ├── app.RenewalRequestModel.ts │ │ │ ├── app.YearModel.ts │ │ │ ├── app.YearwiseRequestModel.ts │ │ │ └── app.YearwiseResponseModel.ts │ │ ├── Services │ │ │ └── app.ReportServices.ts │ │ ├── app.MemberDetailsReport.Component.ts │ │ ├── app.MemberDetailsReport.css │ │ ├── app.MemberDetailsReport.html │ │ ├── app.MonthwiseReport.Component.ts │ │ ├── app.MonthwiseReport.html │ │ ├── app.RenewalReport.Component.ts │ │ ├── app.RenewalReport.html │ │ ├── app.YearwiseReport.Component.ts │ │ └── app.YearwiseReport.html │ ├── RoleMaster │ │ ├── Models │ │ │ └── app.RoleModel.ts │ │ ├── Services │ │ │ └── app.role.Service.ts │ │ ├── app.AllRole.component.ts │ │ ├── app.AllRole.html │ │ ├── app.EditRole.component.ts │ │ ├── app.EditRole.html │ │ ├── app.Role.component.ts │ │ └── app.Role.html │ ├── SchemeMasters │ │ ├── Models │ │ │ ├── app.SchemeDropdownModel.ts │ │ │ └── app.SchemeViewModel.ts │ │ ├── Services │ │ │ └── app.Scheme.Service.ts │ │ ├── app.AllScheme.Component.ts │ │ ├── app.AllSchemeComponent.css │ │ ├── app.AllSchemeComponent.html │ │ ├── app.EditScheme.Component.ts │ │ ├── app.EditSchemeComponent.html │ │ ├── app.Scheme.Component.ts │ │ ├── app.SchemeMaster.html │ │ └── app.SchemeModel.ts │ ├── Shared │ │ ├── PaginationModel.ts │ │ ├── PaginationService.ts │ │ ├── app.GenderModel.ts │ │ ├── constantUrl.ts │ │ └── environment.ts │ ├── UserDashboard │ │ ├── app.UserDashboardComponent.html │ │ └── app.UserDashboardComponent.ts │ ├── _layout │ │ ├── app-admin-layout.component.html │ │ ├── app-adminlayout.component.css │ │ ├── app-adminlayout.component.ts │ │ ├── app-user-layout.component.html │ │ └── app-userlayout.component.ts │ ├── app-routing.module.ts │ ├── app.component.css │ ├── app.component.html │ ├── app.component.spec.ts │ ├── app.component.ts │ └── app.module.ts ├── assets │ └── .gitkeep ├── browserslist ├── environments │ ├── environment.prod.ts │ └── environment.ts ├── favicon.ico ├── index.html ├── karma.conf.js ├── main.ts ├── polyfills.ts ├── styles.css ├── test.ts ├── tsconfig.app.json ├── tsconfig.spec.json └── tslint.json ├── tsconfig.json └── tslint.json /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | -------------------------------------------------------------------------------- /.github/.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # [Saineshwar] 4 | patreon: # Saineshwar 5 | custom: ['https://paypal.me/saineshwar?locale.x=en_GB'] 6 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # [Saineshwar] 4 | patreon: # Saineshwar 5 | custom: ['https://paypal.me/saineshwar?locale.x=en_GB'] 6 | -------------------------------------------------------------------------------- /Images/banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/Images/banner.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 saineshwar bageri 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /WebGYM/WebGYM.Concrete/DatabaseContext.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using Microsoft.EntityFrameworkCore; 7 | using WebGYM.Models; 8 | 9 | namespace WebGYM.Concrete 10 | { 11 | public class DatabaseContext : DbContext 12 | { 13 | public DatabaseContext(DbContextOptions options) : base(options) 14 | { 15 | 16 | } 17 | 18 | public DbSet SchemeMaster { get; set; } 19 | public DbSet PeriodTb { get; set; } 20 | public DbSet PlanMaster { get; set; } 21 | public DbSet Role { get; set; } 22 | public DbSet MemberRegistration { get; set; } 23 | public DbSet Users { get; set; } 24 | public DbSet UsersInRoles { get; set; } 25 | public DbSet PaymentDetails { get; set; } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Concrete/GenerateRecepitConcrete.cs: -------------------------------------------------------------------------------- 1 | using Dapper; 2 | using Microsoft.Extensions.Configuration; 3 | using System; 4 | using System.Collections.Generic; 5 | using System.Data; 6 | using System.Data.SqlClient; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using WebGYM.Interface; 11 | using WebGYM.ViewModels; 12 | 13 | namespace WebGYM.Concrete 14 | { 15 | public class GenerateRecepitConcrete : IGenerateRecepit 16 | { 17 | private readonly IConfiguration _configuration; 18 | private readonly DatabaseContext _context; 19 | 20 | public GenerateRecepitConcrete(DatabaseContext context, IConfiguration configuration) 21 | { 22 | _context = context; 23 | _configuration = configuration; 24 | 25 | } 26 | public GenerateRecepitViewModel Generate(int paymentId) 27 | { 28 | using (var con = new SqlConnection(_configuration.GetConnectionString("DatabaseConnection"))) 29 | { 30 | var para = new DynamicParameters(); 31 | para.Add("@PaymentID", paymentId); 32 | return con.Query("GetRecepit", para, null, true, 0, commandType: CommandType.StoredProcedure).SingleOrDefault(); 33 | } 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Concrete/PeriodMasterConcrete.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using WebGYM.Interface; 7 | using WebGYM.Models; 8 | 9 | namespace WebGYM.Concrete 10 | { 11 | public class PeriodMasterConcrete : IPeriodMaster 12 | { 13 | private readonly DatabaseContext _databaseContext; 14 | public PeriodMasterConcrete(DatabaseContext databaseContext) 15 | { 16 | _databaseContext = databaseContext; 17 | } 18 | 19 | public List ListofPeriod() 20 | { 21 | var listofPeriod = _databaseContext.PeriodTb.ToList(); 22 | 23 | listofPeriod.IndexOf(new PeriodTB() 24 | { 25 | Text = "---Select---", 26 | Value = string.Empty 27 | },0); 28 | 29 | return listofPeriod; 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Concrete/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebGYM.Concrete")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebGYM.Concrete")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("37eafa43-5c3d-4c21-963e-c6373feac1eb")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Concrete/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IGenerateRecepit.cs: -------------------------------------------------------------------------------- 1 | using WebGYM.ViewModels; 2 | 3 | namespace WebGYM.Interface 4 | { 5 | public interface IGenerateRecepit 6 | { 7 | GenerateRecepitViewModel Generate(int paymentId); 8 | } 9 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IMemberRegistration.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using WebGYM.Models; 4 | using WebGYM.ViewModels; 5 | 6 | namespace WebGYM.Interface 7 | { 8 | public interface IMemberRegistration 9 | { 10 | int InsertMember(MemberRegistration memberRegistration); 11 | long CheckNameExitsforUpdate(string memberFName, string memberLName, string memberMName); 12 | bool CheckNameExits(string memberFName ,string memberLName, string memberMName); 13 | List GetMemberList(); 14 | MemberRegistrationViewModel GetMemberbyId(int memberId); 15 | bool DeleteMember(long memberId); 16 | int UpdateMember(MemberRegistration memberRegistration); 17 | IQueryable GetAll(QueryParameters queryParameters, int userId); 18 | int Count(int userId); 19 | List GetMemberNoList(string memberNo, int userId); 20 | } 21 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IPaymentDetails.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using WebGYM.Models; 3 | using WebGYM.ViewModels; 4 | 5 | namespace WebGYM.Interface 6 | { 7 | public interface IPaymentDetails 8 | { 9 | IQueryable GetAll(QueryParameters queryParameters, int userId); 10 | int Count(int userId); 11 | bool RenewalPayment(RenewalViewModel renewalViewModel); 12 | } 13 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IPeriodMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using WebGYM.Models; 7 | 8 | namespace WebGYM.Interface 9 | { 10 | public interface IPeriodMaster 11 | { 12 | List ListofPeriod(); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IPlanMaster.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using WebGYM.Models; 3 | using WebGYM.ViewModels; 4 | 5 | namespace WebGYM.Interface 6 | { 7 | public interface IPlanMaster 8 | { 9 | void InsertPlan(PlanMaster plan); 10 | bool CheckPlanExits(string planName); 11 | List GetPlanMasterList(); 12 | PlanMasterViewModel GetPlanMasterbyId(int planId); 13 | bool DeletePlan(int planId); 14 | bool UpdatePlanMaster(PlanMaster planMaster); 15 | List GetActivePlanMasterList(int? schemeId); 16 | string GetAmount(int planId, int schemeId); 17 | int GetPlanMonthbyPlanId(int? planId); 18 | } 19 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IRenewal.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using WebGYM.ViewModels; 3 | 4 | namespace WebGYM.Interface 5 | { 6 | public interface IRenewal 7 | { 8 | RenewalViewModel GetMemberNo(string memberNo, int userid); 9 | bool CheckRenewalPaymentExists(DateTime newdate, long memberId); 10 | } 11 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IReports.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using WebGYM.ViewModels; 3 | 4 | namespace WebGYM.Interface 5 | { 6 | public interface IReports 7 | { 8 | List Generate_AllMemberDetailsReport(); 9 | List Get_YearwisePayment_details(string year); 10 | List Get_MonthwisePayment_details(string monthId); 11 | List Get_RenewalReport(RenewalReportRequestModel renewalReport); 12 | } 13 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IRole.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using WebGYM.Models; 3 | 4 | namespace WebGYM.Interface 5 | { 6 | public interface IRole 7 | { 8 | void InsertRole(Role role); 9 | bool CheckRoleExits(string roleName); 10 | Role GetRolebyId(int roleId); 11 | bool DeleteRole(int roleId); 12 | bool UpdateRole(Role role); 13 | List GetAllRole(); 14 | } 15 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/ISchemeMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using WebGYM.Models; 7 | 8 | namespace WebGYM.Interface 9 | { 10 | public interface ISchemeMaster 11 | { 12 | bool AddSchemeMaster(SchemeMaster schemeMaster); 13 | List GetSchemeMasterList(); 14 | SchemeMaster GetSchemeMasterbyId(int schemeId); 15 | bool CheckSchemeNameExists(string schemeName); 16 | bool UpdateSchemeMaster(SchemeMaster schemeMaster); 17 | bool DeleteScheme(int schemeId); 18 | 19 | List GetActiveSchemeMasterList(); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IUsers.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using WebGYM.Models; 3 | using WebGYM.ViewModels; 4 | 5 | namespace WebGYM.Interface 6 | { 7 | public interface IUsers 8 | { 9 | bool InsertUsers(Users user); 10 | bool CheckUsersExits(string username); 11 | Users GetUsersbyId(int userid); 12 | bool DeleteUsers(int userid); 13 | bool UpdateUsers(Users role); 14 | List GetAllUsers(); 15 | bool AuthenticateUsers(string username, string password); 16 | LoginResponse GetUserDetailsbyCredentials(string username); 17 | } 18 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/IUsersInRoles.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using WebGYM.Models; 3 | using WebGYM.ViewModels; 4 | 5 | namespace WebGYM.Interface 6 | { 7 | public interface IUsersInRoles 8 | { 9 | bool AssignRole(UsersInRoles usersInRoles); 10 | bool CheckRoleExists(UsersInRoles usersInRoles); 11 | bool RemoveRole(UsersInRoles usersInRoles); 12 | List GetAssignRoles(); 13 | } 14 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.Interface/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebGYM.Interface")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebGYM.Interface")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("9e0f6298-5763-4072-ac8e-8c56286e708c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/DynamicExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Dynamic; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | public static class DynamicExtensions 12 | { 13 | public static dynamic ToDynamic(this object value) 14 | { 15 | IDictionary expando = new ExpandoObject(); 16 | 17 | foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(value.GetType())) 18 | expando.Add(property.Name, property.GetValue(value)); 19 | 20 | return expando as ExpandoObject; 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/PaymentDetails.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | [Table("PaymentDetails")] 12 | public class PaymentDetails 13 | { 14 | [Key] 15 | public long PaymentID { get; set; } 16 | public int PlanID { get; set; } 17 | public int? WorkouttypeID { get; set; } 18 | public string Paymenttype { get; set; } 19 | public DateTime PaymentFromdt { get; set; } 20 | public DateTime PaymentTodt { get; set; } 21 | public decimal? PaymentAmount { get; set; } 22 | public DateTime NextRenwalDate { get; set; } 23 | public DateTime? CreateDate { get; set; } 24 | public int? Createdby { get; set; } 25 | public DateTime? ModifyDate { get; set; } 26 | public int? ModifiedBy { get; set; } 27 | public string RecStatus { get; set; } 28 | public long? MemberID { get; set; } 29 | public string MemberNo { get; set; } 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/PeriodTB.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | [Table("PeriodTB")] 12 | public class PeriodTB 13 | { 14 | [Key] 15 | public int PeriodID { get; set; } 16 | public string Text { get; set; } 17 | public string Value { get; set; } 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/PlanMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.Models 9 | { 10 | public class PlanMaster 11 | { 12 | [Key] 13 | public int PlanID { get; set; } 14 | public string PlanName { get; set; } 15 | public decimal? PlanAmount { get; set; } 16 | public decimal? ServicetaxAmount { get; set; } 17 | public string ServiceTax { get; set; } 18 | public DateTime? CreateDate { get; set; } 19 | public int? CreateUserID { get; set; } 20 | public DateTime? ModifyDate { get; set; } 21 | public int? ModifyUserID { get; set; } 22 | public bool RecStatus { get; set; } 23 | public int? SchemeID { get; set; } 24 | public int PeriodID { get; set; } 25 | public decimal? TotalAmount { get; set; } 26 | public string ServicetaxNo { get; set; } 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebGYM.Models")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebGYM.Models")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("439cbb88-2dbf-4f18-a725-83bf11159038")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/QueryParameters.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.Models 8 | { 9 | public class QueryParameters 10 | { 11 | private const int MaxPageCount = 20; 12 | public int Page { get; set; } = 1; 13 | private int _pageCount = MaxPageCount; 14 | public int PageCount 15 | { 16 | get { return _pageCount; } 17 | set { _pageCount = (value > MaxPageCount) ? MaxPageCount : value; } 18 | } 19 | public string Query { get; set; } 20 | public string OrderBy { get; set; } = "MemberFName"; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/QueryParametersExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.Models 8 | { 9 | public static class QueryParametersExtensions 10 | { 11 | public static bool HasPrevious(this QueryParameters queryParameters) 12 | { 13 | return (queryParameters.Page > 1); 14 | } 15 | 16 | public static bool HasNext(this QueryParameters queryParameters, int totalCount) 17 | { 18 | return (queryParameters.Page < (int)GetTotalPages(queryParameters, totalCount)); 19 | } 20 | 21 | public static double GetTotalPages(this QueryParameters queryParameters, int totalCount) 22 | { 23 | return Math.Ceiling(totalCount / (double)queryParameters.PageCount); 24 | } 25 | 26 | public static bool HasQuery(this QueryParameters queryParameters) 27 | { 28 | return !String.IsNullOrEmpty(queryParameters.Query); 29 | } 30 | 31 | public static bool IsDescending(this QueryParameters queryParameters) 32 | { 33 | if (!String.IsNullOrEmpty(queryParameters.OrderBy)) 34 | { 35 | return queryParameters.OrderBy.Split(' ').Last().ToLowerInvariant().StartsWith("desc"); 36 | } 37 | return false; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/Role.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | [Table("Role")] 12 | public class Role 13 | { 14 | [Key] 15 | public int RoleId { get; set; } 16 | 17 | [Required(ErrorMessage = "Enter Role name")] 18 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 6)] 19 | public string RoleName { get; set; } 20 | 21 | public bool Status { get; set; } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/SchemeMaster.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.Models 9 | { 10 | public class SchemeMaster 11 | { 12 | [Key] 13 | public int SchemeID { get; set; } 14 | public string SchemeName { get; set; } 15 | public int Createdby { get; set; } 16 | public DateTime Createddate { get; set; } 17 | public bool Status { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/Users.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | [Table("Users")] 12 | public class Users 13 | { 14 | [Key] 15 | public int UserId { get; set; } 16 | public string UserName { get; set; } 17 | public string FullName { get; set; } 18 | public string EmailId { get; set; } 19 | public string Contactno { get; set; } 20 | public string Password { get; set; } 21 | public int? Createdby { get; set; } 22 | public DateTime? CreatedDate { get; set; } 23 | public bool Status { get; set; } 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/UsersInRoles.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations.Schema; 5 | using System.Linq; 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.Models 10 | { 11 | [Table("UsersInRoles")] 12 | public class UsersInRoles 13 | { 14 | [Key] 15 | public int UserRolesId { get; set; } 16 | public int RoleId { get; set; } 17 | public int UserId { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.Models/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/AmountRequestViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.ViewModels 9 | { 10 | public class AmountRequestViewModel 11 | { 12 | [Required(ErrorMessage = "Plan is Required")] 13 | public int PlanId { get; set; } 14 | [Required(ErrorMessage = "Scheme is Required")] 15 | public int SchemeId { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/AssignRolesViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class AssignRolesViewModel 10 | { 11 | public int UserId { get; set; } 12 | public string UserName { get; set; } 13 | public int RoleId { get; set; } 14 | public string RoleName { get; set; } 15 | public int UserRolesId { get; set; } 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/GenerateRecepitRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class GenerateRecepitRequestModel 10 | { 11 | public int PaymentId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/GenerateRecepitViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class GenerateRecepitViewModel 10 | { 11 | public string MemberNo { get; set; } 12 | public string MemberName { get; set; } 13 | public string PlanName { get; set; } 14 | public string SchemeName { get; set; } 15 | public string PaymentFromdt { get; set; } 16 | public string PaymentTodt { get; set; } 17 | public string NextRenwalDate { get; set; } 18 | public string PaymentAmount { get; set; } 19 | public string CreateDate { get; set; } 20 | public string ServiceTax { get; set; } 21 | public string PlanAmount { get; set; } 22 | public string ServicetaxAmount { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/LoginResponse.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class LoginResponse 10 | { 11 | public int UserId { get; set; } 12 | public string UserName { get; set; } 13 | public bool Status { get; set; } 14 | public int RoleId { get; set; } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/LoginViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.ViewModels 9 | { 10 | public class LoginRequestViewModel 11 | { 12 | [Required(ErrorMessage = "Enter UserName")] 13 | public string UserName { get; set; } 14 | 15 | [Required(ErrorMessage = "Enter Password")] 16 | public string Password { get; set; } 17 | public string Token { get; set; } 18 | public int Usertype { get; set; } 19 | } 20 | 21 | 22 | } 23 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/MemberDetailsReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebGYM.ViewModels 2 | { 3 | public class MemberDetailsReportViewModel 4 | { 5 | public string Name { get; set; } 6 | public string Address { get; set; } 7 | public string Contactno { get; set; } 8 | public string EmailID { get; set; } 9 | public string MemberNo { get; set; } 10 | public string PlanName { get; set; } 11 | public string SchemeName { get; set; } 12 | public string JoiningDate { get; set; } 13 | public string RenwalDate { get; set; } 14 | public int PaymentAmount { get; set; } 15 | } 16 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/MemberRegistrationGridModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebGYM.ViewModels 4 | { 5 | public class MemberRegistrationGridModel 6 | { 7 | public long MemberId { get; set; } 8 | public string MemberNo { get; set; } 9 | public string MemberName { get; set; } 10 | public DateTime? Dob { get; set; } 11 | public string Contactno { get; set; } 12 | public string EmailId { get; set; } 13 | public string PlanName { get; set; } 14 | public string SchemeName { get; set; } 15 | public DateTime? JoiningDate { get; set; } 16 | public Decimal? Amount { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/MemberRequest.cs: -------------------------------------------------------------------------------- 1 | namespace WebGYM.ViewModels 2 | { 3 | public class MemberRequest 4 | { 5 | public string MemberName { get; set; } 6 | } 7 | public class MemberResponse 8 | { 9 | public string MemberNo { get; set; } 10 | public string MemberName { get; set; } 11 | } 12 | 13 | public class MemberNoRequest 14 | { 15 | public string MemberNo { get; set; } 16 | } 17 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/MonthWiseReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebGYM.ViewModels 2 | { 3 | public class MonthWiseReportViewModel 4 | { 5 | public string MemberFName { get; set; } 6 | public string MemberNo { get; set; } 7 | public string MemberLName { get; set; } 8 | public string MemberMName { get; set; } 9 | public string CreateDate { get; set; } 10 | public long Total { get; set; } 11 | public string Paymentmonth { get; set; } 12 | public double PaymentAmount { get; set; } 13 | public string Username { get; set; } 14 | } 15 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/MonthwiseRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class MonthwiseRequestModel 10 | { 11 | public string MonthId { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/PaymentDetailsViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebGYM.ViewModels 4 | { 5 | public class PaymentDetailsViewModel 6 | { 7 | public long PaymentID { get; set; } 8 | public string PlanName { get; set; } 9 | public string SchemeName { get; set; } 10 | public DateTime? PaymentFromdt { get; set; } 11 | public DateTime? PaymentTodt { get; set; } 12 | public decimal? PaymentAmount { get; set; } 13 | public DateTime? NextRenwalDate { get; set; } 14 | public string RecStatus { get; set; } 15 | public string MemberName { get; set; } 16 | public string MemberNo { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/PlanMasterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class PlanMasterViewModel 10 | { 11 | public int PlanID { get; set; } 12 | public string PlanName { get; set; } 13 | public decimal? PlanAmount { get; set; } 14 | public decimal? ServicetaxAmount { get; set; } 15 | public string ServiceTax { get; set; } 16 | public bool RecStatus { get; set; } 17 | public int? SchemeID { get; set; } 18 | public int? PeriodID { get; set; } 19 | public decimal? TotalAmount { get; set; } 20 | public string ServicetaxNo { get; set; } 21 | } 22 | 23 | 24 | public class PlanMasterDisplayViewModel 25 | { 26 | public int PlanID { get; set; } 27 | public string PlanName { get; set; } 28 | public decimal? PlanAmount { get; set; } 29 | public decimal? ServicetaxAmount { get; set; } 30 | public string ServiceTax { get; set; } 31 | public bool RecStatus { get; set; } 32 | public int? SchemeID { get; set; } 33 | public string SchemeName { get; set; } 34 | public int? PeriodID { get; set; } 35 | public string Text { get; set; } 36 | public decimal? TotalAmount { get; set; } 37 | public string ServicetaxNo { get; set; } 38 | } 39 | 40 | public class ActivePlanModel 41 | { 42 | public string PlanID { get; set; } 43 | public string PlanName { get; set; } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("WebGYM.ViewModels")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("WebGYM.ViewModels")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("4bf92f16-368e-49d9-853f-75204c53b12c")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/RenewalReportRequestModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class RenewalReportRequestModel 10 | { 11 | public string Paymentfromdate { get; set; } 12 | public string Paymentfromto { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/RenewalReportViewModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebGYM.ViewModels 2 | { 3 | public class RenewalReportViewModel 4 | { 5 | public string MemberID { get; set; } 6 | public string PaymentID { get; set; } 7 | public string Name { get; set; } 8 | public string Address { get; set; } 9 | public string Contactno { get; set; } 10 | public string EmailID { get; set; } 11 | public string MemberNo { get; set; } 12 | public string PlanName { get; set; } 13 | public string SchemeName { get; set; } 14 | public string JoiningDate { get; set; } 15 | public string RenwalDate { get; set; } 16 | public string PaymentAmount { get; set; } 17 | 18 | } 19 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/RenewalViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebGYM.ViewModels 4 | { 5 | public class RenewalViewModel 6 | { 7 | public int PlanID { get; set; } 8 | public int? SchemeID { get; set; } 9 | public string MemberName { get; set; } 10 | public long MemberId { get; set; } 11 | public string MemberNo { get; set; } 12 | public DateTime NextRenwalDate { get; set; } 13 | public DateTime NewDate { get; set; } 14 | public Decimal? Amount { get; set; } 15 | public long PaymentID { get; set; } 16 | public long? Createdby { get; set; } 17 | } 18 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/RoleViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.ViewModels 9 | { 10 | public class RoleViewModel 11 | { 12 | [Required(ErrorMessage = "Enter Role name")] 13 | [StringLength(100, ErrorMessage = "The {0} must be at least {2} characters long.", MinimumLength = 3)] 14 | public string RoleName { get; set; } 15 | public bool Status { get; set; } 16 | public int? RoleId { get; set; } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/SchemeMasterViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | 6 | using System.Text; 7 | using System.Threading.Tasks; 8 | 9 | namespace WebGYM.ViewModels 10 | { 11 | public class SchemeMasterViewModel 12 | { 13 | [Required(ErrorMessage = "SchemeName is Required")] 14 | public string SchemeName { get; set; } 15 | 16 | public bool Status { get; set; } 17 | } 18 | public class SchemeMasterEditViewModel 19 | { 20 | [Required(ErrorMessage = "SchemeID is Required")] 21 | public int SchemeID { get; set; } 22 | 23 | [Required(ErrorMessage = "SchemeName is Required")] 24 | public string SchemeName { get; set; } 25 | 26 | public bool Status { get; set; } 27 | } 28 | 29 | 30 | } 31 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/UsersViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace WebGYM.ViewModels 9 | { 10 | public class UsersViewModel 11 | { 12 | public int Id { get; set; } 13 | 14 | [Required] 15 | public string UserName { get; set; } 16 | [Required] 17 | public string FullName { get; set; } 18 | [Required] 19 | public string EmailId { get; set; } 20 | [Required] 21 | public string Contactno { get; set; } 22 | [Required] 23 | public string Password { get; set; } 24 | public bool Status { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/YearWiseRequestModel.cs: -------------------------------------------------------------------------------- 1 | namespace WebGYM.ViewModels 2 | { 3 | public class YearWiseRequestModel 4 | { 5 | // ReSharper disable once InconsistentNaming 6 | public string YearID { get; set; } 7 | } 8 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM.ViewModels/YearwiseReportViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace WebGYM.ViewModels 8 | { 9 | public class YearwiseReportViewModel 10 | { 11 | public int CurrentYear { get; set; } 12 | public int April { get; set; } 13 | public int May { get; set; } 14 | public int June { get; set; } 15 | public int July { get; set; } 16 | public int August { get; set; } 17 | public int Sept { get; set; } 18 | public int Oct { get; set; } 19 | public int Nov { get; set; } 20 | public int Decm { get; set; } 21 | public int Jan { get; set; } 22 | public int Feb { get; set; } 23 | public int March { get; set; } 24 | public int Total { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/AllActivePlanMasterController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.ViewModels; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | /// 14 | /// View All Active Plan Master Related API EndPoints 15 | /// 16 | [Authorize] 17 | [Route("api/[controller]")] 18 | [ApiController] 19 | public class AllActivePlanMasterController : ControllerBase 20 | { 21 | 22 | private readonly IPlanMaster _planMaster; 23 | public AllActivePlanMasterController(IPlanMaster planMaster) 24 | { 25 | _planMaster = planMaster; 26 | } 27 | 28 | // 29 | /// 30 | /// Get All Active Plan or Get Specific Active Plan by ID 31 | /// 32 | /// 33 | /// 34 | /// GET: api/AllActivePlanMaster/5 35 | /// 36 | /// 37 | [HttpGet("{id}", Name = "GetAllActivePlan")] 38 | public List Get(int? id) 39 | { 40 | try 41 | { 42 | if (id != null) 43 | { 44 | return _planMaster.GetActivePlanMasterList(id); 45 | } 46 | else 47 | { 48 | return new List() 49 | { 50 | new ActivePlanModel() 51 | { 52 | PlanID = string.Empty, 53 | PlanName = "" 54 | } 55 | }; 56 | } 57 | } 58 | catch (Exception) 59 | { 60 | 61 | throw; 62 | } 63 | 64 | } 65 | 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/GenerateRecepitController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Http; 6 | using Microsoft.AspNetCore.Mvc; 7 | using WebGYM.Interface; 8 | using WebGYM.ViewModels; 9 | 10 | namespace WebGYM.Controllers 11 | { 12 | [Route("api/[controller]")] 13 | [ApiController] 14 | public class GenerateRecepitController : ControllerBase 15 | { 16 | private readonly IGenerateRecepit _generateRecepit; 17 | public GenerateRecepitController(IGenerateRecepit generateRecepit) 18 | { 19 | _generateRecepit = generateRecepit; 20 | } 21 | 22 | 23 | // POST: api/GenerateRecepit 24 | [HttpPost] 25 | public GenerateRecepitViewModel Post([FromBody] GenerateRecepitRequestModel generateRecepitRequestModel) 26 | { 27 | try 28 | { 29 | return _generateRecepit.Generate(generateRecepitRequestModel.PaymentId); 30 | } 31 | catch (Exception) 32 | { 33 | throw; 34 | } 35 | } 36 | 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/GetMemberNoController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.AspNetCore.Mvc; 9 | using WebGYM.Interface; 10 | using WebGYM.ViewModels; 11 | 12 | namespace WebGYM.Controllers 13 | { 14 | [Authorize] 15 | [Route("api/[controller]")] 16 | [ApiController] 17 | public class GetMemberNoController : ControllerBase 18 | { 19 | private readonly IMemberRegistration _memberRegistration; 20 | public GetMemberNoController(IMemberRegistration memberRegistration) 21 | { 22 | _memberRegistration = memberRegistration; 23 | } 24 | 25 | 26 | // POST: api/GetMemberNo 27 | [HttpPost] 28 | public List Post([FromBody] MemberRequest memberRequest) 29 | { 30 | try 31 | { 32 | var userId = Convert.ToInt32(this.User.FindFirstValue(ClaimTypes.Name)); 33 | return _memberRegistration.GetMemberNoList(memberRequest.MemberName, userId); 34 | } 35 | catch (Exception) 36 | { 37 | throw; 38 | } 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/GetTotalAmountController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net.Http; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.AspNetCore.Mvc; 9 | using WebGYM.Interface; 10 | using WebGYM.ViewModels; 11 | 12 | namespace WebGYM.Controllers 13 | { 14 | [Authorize] 15 | [Route("api/[controller]")] 16 | [ApiController] 17 | public class GetTotalAmountController : ControllerBase 18 | { 19 | private readonly IPlanMaster _planMaster; 20 | public GetTotalAmountController(IPlanMaster planMaster) 21 | { 22 | _planMaster = planMaster; 23 | } 24 | 25 | 26 | // POST: api/GetTotalAmount 27 | [HttpPost] 28 | public string Post([FromBody] AmountRequestViewModel amountRequest) 29 | { 30 | try 31 | { 32 | if (ModelState.IsValid) 33 | { 34 | return _planMaster.GetAmount(amountRequest.PlanId, amountRequest.SchemeId); 35 | } 36 | else 37 | { 38 | return string.Empty; 39 | } 40 | } 41 | catch (Exception) 42 | { 43 | throw; 44 | } 45 | } 46 | 47 | 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/HomeController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Diagnostics; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Mvc; 7 | using WebGYM.Interface; 8 | using WebGYM.Models; 9 | 10 | namespace WebGYM.Controllers 11 | { 12 | public class HomeController : Controller 13 | { 14 | private ISchemeMaster _schemeMaster; 15 | public HomeController(ISchemeMaster schemeMaster) 16 | { 17 | _schemeMaster = schemeMaster; 18 | } 19 | public IActionResult Index() 20 | { 21 | return View(); 22 | } 23 | 24 | public IActionResult About() 25 | { 26 | ViewData["Message"] = "Your application description page."; 27 | 28 | return View(); 29 | } 30 | 31 | public IActionResult Contact() 32 | { 33 | ViewData["Message"] = "Your contact page."; 34 | 35 | return View(); 36 | } 37 | 38 | public IActionResult Privacy() 39 | { 40 | return View(); 41 | } 42 | 43 | [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] 44 | public IActionResult Error() 45 | { 46 | return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/MemberDetailsReportController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.ViewModels; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | [Authorize] 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class MemberDetailsReportController : ControllerBase 17 | { 18 | private readonly IReports _reports; 19 | public MemberDetailsReportController(IReports reports) 20 | { 21 | _reports = reports; 22 | } 23 | 24 | // GET: api/MemberDetailsReport 25 | [HttpGet] 26 | public List Get() 27 | { 28 | try 29 | { 30 | return _reports.Generate_AllMemberDetailsReport(); 31 | } 32 | catch (Exception) 33 | { 34 | throw; 35 | } 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/MonthwiseReportController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.ViewModels; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | [Authorize] 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class MonthwiseReportController : ControllerBase 17 | { 18 | 19 | private readonly IReports _reports; 20 | public MonthwiseReportController(IReports reports) 21 | { 22 | _reports = reports; 23 | } 24 | 25 | // POST: api/MonthwiseReport 26 | [HttpPost] 27 | public List Post([FromBody] MonthwiseRequestModel value) 28 | { 29 | try 30 | { 31 | return _reports.Get_MonthwisePayment_details(value.MonthId); 32 | } 33 | catch (Exception) 34 | { 35 | throw; 36 | } 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/PaymentController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.AspNetCore.Mvc; 9 | using Newtonsoft.Json; 10 | using WebGYM.Common; 11 | using WebGYM.Interface; 12 | using WebGYM.Models; 13 | using WebGYM.ViewModels; 14 | 15 | namespace WebGYM.Controllers 16 | { 17 | [Authorize] 18 | [Route("api/[controller]")] 19 | [ApiController] 20 | public class PaymentController : ControllerBase 21 | { 22 | private readonly IPaymentDetails _paymentDetails; 23 | private readonly IUrlHelper _urlHelper; 24 | public PaymentController(IUrlHelper urlHelper, IPaymentDetails paymentDetails) 25 | { 26 | _paymentDetails = paymentDetails; 27 | _urlHelper = urlHelper; 28 | } 29 | 30 | // GET: api/Payment 31 | [HttpGet(Name = "GetAllPayment")] 32 | public IActionResult GetAllPayment([FromQuery] QueryParameters queryParameters) 33 | { 34 | try 35 | { 36 | var userId = Convert.ToInt32(this.User.FindFirstValue(ClaimTypes.Name)); 37 | 38 | List allMembers = _paymentDetails.GetAll(queryParameters, userId).ToList(); 39 | 40 | var allItemCount = _paymentDetails.Count(userId); 41 | 42 | var paginationMetadata = new 43 | { 44 | totalCount = allItemCount, 45 | pageSize = queryParameters.PageCount, 46 | currentPage = queryParameters.Page, 47 | totalPages = queryParameters.GetTotalPages(allItemCount) 48 | }; 49 | 50 | Request.HttpContext.Response.Headers.Add("X-Pagination", JsonConvert.SerializeObject(paginationMetadata)); 51 | 52 | return Ok(new 53 | { 54 | value = allMembers 55 | }); 56 | } 57 | catch (Exception) 58 | { 59 | throw; 60 | } 61 | } 62 | 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/PeriodController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.Models; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class PeriodController : ControllerBase 17 | { 18 | private readonly IPeriodMaster _periodMaster; 19 | public PeriodController(IPeriodMaster periodMaster) 20 | { 21 | _periodMaster = periodMaster; 22 | } 23 | 24 | // GET: api/Period 25 | [HttpGet] 26 | public IEnumerable Get() 27 | { 28 | try 29 | { 30 | return _periodMaster.ListofPeriod(); 31 | } 32 | catch (Exception) 33 | { 34 | throw; 35 | } 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/RemoveRoleController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Net; 5 | using System.Net.Http; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore.Authorization; 8 | using Microsoft.AspNetCore.Http; 9 | using Microsoft.AspNetCore.Mvc; 10 | using WebGYM.Interface; 11 | using WebGYM.Models; 12 | 13 | namespace WebGYM.Controllers 14 | { 15 | [Authorize] 16 | [Route("api/[controller]")] 17 | [ApiController] 18 | public class RemoveRoleController : ControllerBase 19 | { 20 | 21 | private readonly IUsersInRoles _usersInRoles; 22 | public RemoveRoleController(IUsersInRoles usersInRoles) 23 | { 24 | _usersInRoles = usersInRoles; 25 | } 26 | 27 | // POST: api/RemoveRole 28 | [HttpPost] 29 | public HttpResponseMessage Post([FromBody] UsersInRoles usersInRoles) 30 | { 31 | if (ModelState.IsValid) 32 | { 33 | if (_usersInRoles.CheckRoleExists(usersInRoles)) 34 | { 35 | 36 | usersInRoles.UserRolesId = 0; 37 | _usersInRoles.RemoveRole(usersInRoles); 38 | 39 | var response = new HttpResponseMessage() 40 | { 41 | StatusCode = HttpStatusCode.OK 42 | }; 43 | 44 | return response; 45 | } 46 | else 47 | { 48 | var response = new HttpResponseMessage() 49 | { 50 | StatusCode = HttpStatusCode.Conflict 51 | }; 52 | 53 | return response; 54 | } 55 | } 56 | else 57 | { 58 | var response = new HttpResponseMessage() 59 | { 60 | 61 | StatusCode = HttpStatusCode.BadRequest 62 | }; 63 | 64 | return response; 65 | } 66 | } 67 | 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/RenewalDetailsController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Security.Claims; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore.Authorization; 7 | using Microsoft.AspNetCore.Http; 8 | using Microsoft.AspNetCore.Mvc; 9 | using WebGYM.Interface; 10 | using WebGYM.ViewModels; 11 | 12 | namespace WebGYM.Controllers 13 | { 14 | [Authorize] 15 | [Route("api/[controller]")] 16 | [ApiController] 17 | public class RenewalDetailsController : ControllerBase 18 | { 19 | private readonly IRenewal _renewal; 20 | public RenewalDetailsController(IRenewal renewal) 21 | { 22 | _renewal = renewal; 23 | } 24 | 25 | // POST: api/RenewalDetails 26 | [HttpPost] 27 | public RenewalViewModel Post([FromBody] MemberNoRequest memberNoRequest) 28 | { 29 | var userId = Convert.ToInt32(this.User.FindFirstValue(ClaimTypes.Name)); 30 | return _renewal.GetMemberNo(memberNoRequest.MemberNo, userId); 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/RenewalReportController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.ViewModels; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | [Authorize] 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class RenewalReportController : ControllerBase 17 | { 18 | private readonly IReports _reports; 19 | public RenewalReportController(IReports reports) 20 | { 21 | _reports = reports; 22 | } 23 | 24 | // POST: api/RenewalReport 25 | [HttpPost] 26 | public List Post([FromBody] RenewalReportRequestModel value) 27 | { 28 | try 29 | { 30 | return _reports.Get_RenewalReport(value); 31 | } 32 | catch (Exception) 33 | { 34 | throw; 35 | } 36 | } 37 | 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/SchemeDropdownController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.Models; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | [Authorize] 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class SchemeDropdownController : ControllerBase 17 | { 18 | 19 | private readonly ISchemeMaster _schemeMaster; 20 | public SchemeDropdownController(ISchemeMaster schemeMaster) 21 | { 22 | _schemeMaster = schemeMaster; 23 | } 24 | 25 | // GET: api/SchemeDropdown 26 | [HttpGet] 27 | public IEnumerable Get() 28 | { 29 | try 30 | { 31 | return _schemeMaster.GetActiveSchemeMasterList(); 32 | } 33 | catch (Exception) 34 | { 35 | throw; 36 | } 37 | } 38 | 39 | 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Controllers/YearwiseReportController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using Microsoft.AspNetCore.Authorization; 6 | using Microsoft.AspNetCore.Http; 7 | using Microsoft.AspNetCore.Mvc; 8 | using WebGYM.Interface; 9 | using WebGYM.ViewModels; 10 | 11 | namespace WebGYM.Controllers 12 | { 13 | [Authorize] 14 | [Route("api/[controller]")] 15 | [ApiController] 16 | public class YearwiseReportController : ControllerBase 17 | { 18 | private readonly IReports _reports; 19 | public YearwiseReportController(IReports reports) 20 | { 21 | _reports = reports; 22 | } 23 | 24 | // POST: api/YearwiseReport 25 | [HttpPost] 26 | public List Post([FromBody] YearWiseRequestModel value) 27 | { 28 | return _reports.Get_YearwisePayment_details(value.YearID); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Models/AppSettings.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace WebGYM.Models 7 | { 8 | public class AppSettings 9 | { 10 | public string Secret { get; set; } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | 3 | namespace WebGYM.Models 4 | { 5 | public class ErrorViewModel 6 | { 7 | public string RequestId { get; set; } 8 | 9 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 10 | } 11 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.IO; 4 | using System.Linq; 5 | using System.Threading.Tasks; 6 | using Microsoft.AspNetCore; 7 | using Microsoft.AspNetCore.Hosting; 8 | using Microsoft.Extensions.Configuration; 9 | using Microsoft.Extensions.Logging; 10 | 11 | namespace WebGYM 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateWebHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) => 21 | WebHost.CreateDefaultBuilder(args) 22 | .UseStartup(); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Properties/launchSettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iisSettings": { 3 | "windowsAuthentication": false, 4 | "anonymousAuthentication": true, 5 | "iisExpress": { 6 | "applicationUrl": "http://localhost:49749", 7 | "sslPort": 0 8 | } 9 | }, 10 | "profiles": { 11 | "IIS Express": { 12 | "commandName": "IISExpress", 13 | "launchBrowser": true, 14 | "environmentVariables": { 15 | "ASPNETCORE_ENVIRONMENT": "Development" 16 | } 17 | }, 18 | "WebGYM": { 19 | "commandName": "Project", 20 | "launchBrowser": true, 21 | "applicationUrl": "http://localhost:5000", 22 | "environmentVariables": { 23 | "ASPNETCORE_ENVIRONMENT": "Development" 24 | } 25 | } 26 | } 27 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Home/About.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "About"; 3 | } 4 |

@ViewData["Title"]

5 |

@ViewData["Message"]

6 | 7 |

Use this area to provide additional information.

8 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Home/Contact.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Contact"; 3 | } 4 |

@ViewData["Title"]

5 |

@ViewData["Message"]

6 | 7 |
8 | One Microsoft Way
9 | Redmond, WA 98052-6399
10 | P: 11 | 425.555.0100 12 |
13 | 14 |
15 | Support: Support@example.com
16 | Marketing: Marketing@example.com 17 |
18 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Home/Index.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Home Page"; 3 | } 4 | 5 |
6 |
7 |

DOT&NET GYM

8 |

All APIS Service of Project

9 |
10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Home/Privacy.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | ViewData["Title"] = "Privacy Policy"; 3 | } 4 |

@ViewData["Title"]

5 | 6 |

Use this page to detail your site's privacy policy.

7 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorViewModel 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

Error.

7 |

An error occurred while processing your request.

8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

12 | Request ID: @Model.RequestId 13 |

14 | } 15 | 16 |

Development Mode

17 |

18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

20 |

21 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 22 |

23 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Shared/_CookieConsentPartial.cshtml: -------------------------------------------------------------------------------- 1 | @using Microsoft.AspNetCore.Http.Features 2 | 3 | @{ 4 | var consentFeature = Context.Features.Get(); 5 | var showBanner = !consentFeature?.CanTrack ?? false; 6 | var cookieString = consentFeature?.CreateConsentCookie(); 7 | } 8 | 9 | @if (showBanner) 10 | { 11 | 33 | 41 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/Shared/_ValidationScriptsPartial.cshtml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 12 | 18 | 19 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using WebGYM 2 | @using WebGYM.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/WebGYM.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | netcoreapp2.1 5 | 6 | 7 | 8 | 1701;1702;1591 9 | bin\Debug\netcoreapp2.1\WebGYM.xml 10 | bin\Debug\netcoreapp2.1\ 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/appsettings.Development.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Debug", 5 | "System": "Information", 6 | "Microsoft": "Information" 7 | } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "AppSettings": { 3 | "Secret": "6XJCIEJO41PQZNWJC4RR" 4 | }, 5 | "Logging": { 6 | "LogLevel": { 7 | "Default": "Warning" 8 | } 9 | }, 10 | "AllowedHosts": "*", 11 | "ConnectionStrings": { 12 | "DatabaseConnection": "Data Source=SAI-PC\\SQLEXPRESS; UID=sa; Password=Pass$123;Database=AngularGYMDB;" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | /* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification\ 2 | for details on configuring this project to bundle and minify static web assets. */ 3 | body { 4 | padding-top: 50px; 5 | padding-bottom: 20px; 6 | } 7 | 8 | /* Wrapping element */ 9 | /* Set some basic padding to keep content from hitting the edges */ 10 | .body-content { 11 | padding-left: 15px; 12 | padding-right: 15px; 13 | } 14 | 15 | /* Carousel */ 16 | .carousel-caption p { 17 | font-size: 20px; 18 | line-height: 1.4; 19 | } 20 | 21 | /* Make .svg files in the carousel display properly in older browsers */ 22 | .carousel-inner .item img[src$=".svg"] { 23 | width: 100%; 24 | } 25 | 26 | /* QR code generator */ 27 | #qrCode { 28 | margin: 15px; 29 | } 30 | 31 | /* Hide/rearrange for smaller screens */ 32 | @media screen and (max-width: 767px) { 33 | /* Hide captions */ 34 | .carousel-caption { 35 | display: none; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/css/site.min.css: -------------------------------------------------------------------------------- 1 | body{padding-top:50px;padding-bottom:20px}.body-content{padding-left:15px;padding-right:15px}.carousel-caption p{font-size:20px;line-height:1.4}.carousel-inner .item img[src$=".svg"]{width:100%}#qrCode{margin:15px}@media screen and (max-width:767px){.carousel-caption{display:none}} -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/favicon.ico -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/js/site.js: -------------------------------------------------------------------------------- 1 | // Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification 2 | // for details on configuring this project to bundle and minify static web assets. 3 | 4 | // Write your JavaScript code. 5 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/js/site.min.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/js/site.min.js -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 3" 33 | }, 34 | "version": "3.3.7", 35 | "_release": "3.3.7", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.7", 39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" 40 | }, 41 | "_source": "https://github.com/twbs/bootstrap.git", 42 | "_target": "v3.3.7", 43 | "_originalSource": "bootstrap", 44 | "_direct": true 45 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2016 Twitter, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery-validation-unobtrusive/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-validation-unobtrusive", 3 | "homepage": "https://github.com/aspnet/jquery-validation-unobtrusive", 4 | "version": "3.2.9", 5 | "_release": "3.2.9", 6 | "_resolution": { 7 | "type": "version", 8 | "tag": "v3.2.9", 9 | "commit": "a91f5401898e125f10771c5f5f0909d8c4c82396" 10 | }, 11 | "_source": "https://github.com/aspnet/jquery-validation-unobtrusive.git", 12 | "_target": "^3.2.9", 13 | "_originalSource": "jquery-validation-unobtrusive", 14 | "_direct": true 15 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) .NET Foundation. All rights reserved. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); you may not use 4 | these files except in compliance with the License. You may obtain a copy of the 5 | License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software distributed 10 | under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR 11 | CONDITIONS OF ANY KIND, either express or implied. See the License for the 12 | specific language governing permissions and limitations under the License. 13 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery-validation/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-validation", 3 | "homepage": "https://jqueryvalidation.org/", 4 | "repository": { 5 | "type": "git", 6 | "url": "git://github.com/jquery-validation/jquery-validation.git" 7 | }, 8 | "authors": [ 9 | "Jörn Zaefferer " 10 | ], 11 | "description": "Form validation made easy", 12 | "main": "dist/jquery.validate.js", 13 | "keywords": [ 14 | "forms", 15 | "validation", 16 | "validate" 17 | ], 18 | "license": "MIT", 19 | "ignore": [ 20 | "**/.*", 21 | "node_modules", 22 | "bower_components", 23 | "test", 24 | "demo", 25 | "lib" 26 | ], 27 | "dependencies": { 28 | "jquery": ">= 1.7.2" 29 | }, 30 | "version": "1.17.0", 31 | "_release": "1.17.0", 32 | "_resolution": { 33 | "type": "version", 34 | "tag": "1.17.0", 35 | "commit": "fc9b12d3bfaa2d0c04605855b896edb2934c0772" 36 | }, 37 | "_source": "https://github.com/jzaefferer/jquery-validation.git", 38 | "_target": "^1.17.0", 39 | "_originalSource": "jquery-validation", 40 | "_direct": true 41 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery-validation/LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | ===================== 3 | 4 | Copyright Jörn Zaefferer 5 | 6 | Permission is hereby granted, free of charge, to any person obtaining a copy 7 | of this software and associated documentation files (the "Software"), to deal 8 | in the Software without restriction, including without limitation the rights 9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10 | copies of the Software, and to permit persons to whom the Software is 11 | furnished to do so, subject to the following conditions: 12 | 13 | The above copyright notice and this permission notice shall be included in 14 | all copies or substantial portions of the Software. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 22 | THE SOFTWARE. 23 | -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ], 14 | "homepage": "https://github.com/jquery/jquery-dist", 15 | "version": "3.3.1", 16 | "_release": "3.3.1", 17 | "_resolution": { 18 | "type": "version", 19 | "tag": "3.3.1", 20 | "commit": "9e8ec3d10fad04748176144f108d7355662ae75e" 21 | }, 22 | "_source": "https://github.com/jquery/jquery-dist.git", 23 | "_target": "^3.3.1", 24 | "_originalSource": "jquery", 25 | "_direct": true 26 | } -------------------------------------------------------------------------------- /WebGYM/WebGYM/wwwroot/lib/jquery/LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright JS Foundation and other contributors, https://js.foundation/ 2 | 3 | This software consists of voluntary contributions made by many 4 | individuals. For exact contribution history, see the revision history 5 | available at https://github.com/jquery/jquery 6 | 7 | The following license applies to all parts of this software except as 8 | documented below: 9 | 10 | ==== 11 | 12 | Permission is hereby granted, free of charge, to any person obtaining 13 | a copy of this software and associated documentation files (the 14 | "Software"), to deal in the Software without restriction, including 15 | without limitation the rights to use, copy, modify, merge, publish, 16 | distribute, sublicense, and/or sell copies of the Software, and to 17 | permit persons to whom the Software is furnished to do so, subject to 18 | the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be 21 | included in all copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 24 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 25 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 26 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 27 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 28 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 29 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 30 | 31 | ==== 32 | 33 | All files located in the node_modules and external directories are 34 | externally maintained libraries used by this software which have their 35 | own licenses; we recommend you read them, as their terms may differ from 36 | the terms above. 37 | -------------------------------------------------------------------------------- /gym-project/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /gym-project/README.md: -------------------------------------------------------------------------------- 1 | # GymProject 2 | 3 | This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 7.0.6. 4 | 5 | ## Development server 6 | 7 | Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files. 8 | 9 | ## Code scaffolding 10 | 11 | Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`. 12 | 13 | ## Build 14 | 15 | Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build. 16 | 17 | ## Running unit tests 18 | 19 | Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io). 20 | 21 | ## Running end-to-end tests 22 | 23 | Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/). 24 | 25 | ## Further help 26 | 27 | To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md). 28 | -------------------------------------------------------------------------------- /gym-project/e2e/protractor.conf.js: -------------------------------------------------------------------------------- 1 | // Protractor configuration file, see link for more information 2 | // https://github.com/angular/protractor/blob/master/lib/config.ts 3 | 4 | const { SpecReporter } = require('jasmine-spec-reporter'); 5 | 6 | exports.config = { 7 | allScriptsTimeout: 11000, 8 | specs: [ 9 | './src/**/*.e2e-spec.ts' 10 | ], 11 | capabilities: { 12 | 'browserName': 'chrome' 13 | }, 14 | directConnect: true, 15 | baseUrl: 'http://localhost:4200/', 16 | framework: 'jasmine', 17 | jasmineNodeOpts: { 18 | showColors: true, 19 | defaultTimeoutInterval: 30000, 20 | print: function() {} 21 | }, 22 | onPrepare() { 23 | require('ts-node').register({ 24 | project: require('path').join(__dirname, './tsconfig.e2e.json') 25 | }); 26 | jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } })); 27 | } 28 | }; -------------------------------------------------------------------------------- /gym-project/e2e/src/app.e2e-spec.ts: -------------------------------------------------------------------------------- 1 | import { AppPage } from './app.po'; 2 | 3 | describe('workspace-project App', () => { 4 | let page: AppPage; 5 | 6 | beforeEach(() => { 7 | page = new AppPage(); 8 | }); 9 | 10 | it('should display welcome message', () => { 11 | page.navigateTo(); 12 | expect(page.getTitleText()).toEqual('Welcome to gym-project!'); 13 | }); 14 | }); 15 | -------------------------------------------------------------------------------- /gym-project/e2e/src/app.po.ts: -------------------------------------------------------------------------------- 1 | import { browser, by, element } from 'protractor'; 2 | 3 | export class AppPage { 4 | navigateTo() { 5 | return browser.get('/'); 6 | } 7 | 8 | getTitleText() { 9 | return element(by.css('app-root h1')).getText(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /gym-project/e2e/tsconfig.e2e.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "../out-tsc/app", 5 | "module": "commonjs", 6 | "target": "es5", 7 | "types": [ 8 | "jasmine", 9 | "jasminewd2", 10 | "node" 11 | ] 12 | } 13 | } -------------------------------------------------------------------------------- /gym-project/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "gym-project", 3 | "version": "0.0.0", 4 | "scripts": { 5 | "ng": "ng", 6 | "start": "ng serve", 7 | "build": "ng build", 8 | "test": "ng test", 9 | "lint": "ng lint", 10 | "e2e": "ng e2e" 11 | }, 12 | "private": true, 13 | "dependencies": { 14 | "@angular/animations": "^7.0.4", 15 | "@angular/cdk": "^7.1.1", 16 | "@angular/common": "~7.0.0", 17 | "@angular/compiler": "~7.0.0", 18 | "@angular/core": "~7.0.0", 19 | "@angular/forms": "~7.0.0", 20 | "@angular/http": "~7.0.0", 21 | "@angular/material": "^7.1.1", 22 | "@angular/platform-browser": "~7.0.0", 23 | "@angular/platform-browser-dynamic": "~7.0.0", 24 | "@angular/router": "~7.0.0", 25 | "classlist.js": "^1.1.20150312", 26 | "core-js": "^2.5.4", 27 | "hammerjs": "^2.0.8", 28 | "html2canvas": "^1.0.0-alpha.12", 29 | "jspdf": "^1.5.2", 30 | "ngx-bootstrap": "^3.1.2", 31 | "rxjs": "~6.3.3", 32 | "web-animations-js": "^2.3.1", 33 | "xlsx": "^0.14.1", 34 | "zone.js": "~0.8.26" 35 | }, 36 | "devDependencies": { 37 | "@angular-devkit/build-angular": "^0.13.0", 38 | "@angular/cli": "~7.0.6", 39 | "@angular/compiler-cli": "~7.0.0", 40 | "@angular/language-service": "~7.0.0", 41 | "@types/jasmine": "~2.8.8", 42 | "@types/jasminewd2": "~2.0.3", 43 | "@types/node": "~8.9.4", 44 | "codelyzer": "~4.5.0", 45 | "jasmine-core": "~2.99.1", 46 | "jasmine-spec-reporter": "~4.2.1", 47 | "karma": "~3.0.0", 48 | "karma-chrome-launcher": "~2.2.0", 49 | "karma-coverage-istanbul-reporter": "~2.0.1", 50 | "karma-jasmine": "~1.1.2", 51 | "karma-jasmine-html-reporter": "^0.2.2", 52 | "protractor": "~5.4.0", 53 | "ts-node": "~7.0.0", 54 | "tslint": "~5.11.0", 55 | "typescript": "~3.1.6" 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /gym-project/src/app/AdminDashboard/app.AdminDashboardComponent.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/gym-project/src/app/AdminDashboard/app.AdminDashboardComponent.html -------------------------------------------------------------------------------- /gym-project/src/app/AdminDashboard/app.AdminDashboardComponent.ts: -------------------------------------------------------------------------------- 1 | import { Component} from '@angular/core'; 2 | 3 | @Component({ 4 | templateUrl:'./app.AdminDashboardComponent.html' 5 | }) 6 | 7 | export class AdminDashboardComponent 8 | { 9 | 10 | } -------------------------------------------------------------------------------- /gym-project/src/app/AssignRole/Models/AssignRemoveModel.ts: -------------------------------------------------------------------------------- 1 | export class AssignRemoveModel 2 | { 3 | public UserId: number; 4 | public RoleId : number; 5 | } -------------------------------------------------------------------------------- /gym-project/src/app/AssignRole/Models/AssignRolesViewModel.ts: -------------------------------------------------------------------------------- 1 | export class AssignRolesViewModel 2 | { 3 | public UserId: number; 4 | public RoleId : number; 5 | public UserName: string; 6 | public RoleName :string; 7 | public UserRolesId: number; 8 | } -------------------------------------------------------------------------------- /gym-project/src/app/AssignRole/app.AllAssignRole.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit, ViewChild } from '@angular/core'; 2 | 3 | import { Router } from '@angular/router'; 4 | import { MatTableDataSource, MatSort, MatPaginator, PageEvent } from '@angular/material'; 5 | import { AssignandRemoveRoleService } from './Services/app.AssignandRemoveRole.Service'; 6 | import { AssignRolesViewModel } from './Models/AssignRolesViewModel'; 7 | 8 | 9 | @Component({ 10 | templateUrl: './app.AllAssignedRoles.html', 11 | styleUrls: ['../Content/vendor/bootstrap/css/bootstrap.min.css', 12 | '../Content/vendor/metisMenu/metisMenu.min.css', 13 | '../Content/dist/css/sb-admin-2.css', 14 | '../Content/vendor/font-awesome/css/font-awesome.min.css' 15 | ] 16 | }) 17 | 18 | export class AllAssignRoleComponent implements OnInit 19 | { 20 | private _assignservice; 21 | @ViewChild(MatSort) sort: MatSort; 22 | @ViewChild(MatPaginator) paginator: MatPaginator; 23 | displayedColumns: string[] = ['RoleName', 'UserName']; 24 | dataSource: any; 25 | AssignModel : AssignRolesViewModel[] 26 | errorMessage: any; 27 | offset: any; 28 | 29 | ngOnInit(): void { 30 | this._assignservice.GetAllAssignedRoles().subscribe( 31 | assignModel => 32 | { 33 | 34 | this.dataSource = new MatTableDataSource(assignModel); 35 | this.dataSource.sort = this.sort; 36 | this.dataSource.paginator = this.paginator; 37 | }, 38 | error => this.errorMessage = error 39 | ); 40 | } 41 | 42 | constructor(private _Route: Router, assignservice: AssignandRemoveRoleService) { 43 | this._assignservice = assignservice; 44 | } 45 | 46 | applyFilter(filterValue: string) { 47 | this.dataSource.filter = filterValue.trim().toLowerCase(); 48 | } 49 | 50 | getNext(event: PageEvent) { 51 | this.offset = event.pageSize * event.pageIndex 52 | // call your api function here with the offset 53 | console.log(event.pageSize); 54 | console.log(event.pageIndex); 55 | } 56 | 57 | } -------------------------------------------------------------------------------- /gym-project/src/app/AssignRole/app.AllAssignedRoles.html: -------------------------------------------------------------------------------- 1 |

All AssignRoles

2 |
3 | 4 |
5 |
6 |
7 | 8 | 9 | 10 |
11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
UserName {{element.UserName}} RoleName {{element.RoleName}}
25 | 28 |
29 |
30 |
-------------------------------------------------------------------------------- /gym-project/src/app/AuthGuard/AdminAuthGuardService.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router, CanActivate } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class AdminAuthGuardService implements CanActivate { 6 | 7 | constructor(private router: Router) { } 8 | 9 | canActivate() 10 | { 11 | if (localStorage.getItem('AdminUser')) 12 | { 13 | // logged in so return true 14 | return true; 15 | } 16 | 17 | // not logged in so redirect to login page 18 | this.router.navigate(['/Login']); 19 | return false; 20 | } 21 | } -------------------------------------------------------------------------------- /gym-project/src/app/AuthGuard/UserAuthGuardService.ts: -------------------------------------------------------------------------------- 1 | import { Injectable } from '@angular/core'; 2 | import { Router, CanActivate } from '@angular/router'; 3 | 4 | @Injectable() 5 | export class UserAuthGuardService implements CanActivate { 6 | 7 | constructor(private router: Router) { } 8 | 9 | canActivate() 10 | { 11 | if (localStorage.getItem('currentUser')) 12 | { 13 | // logged in so return true 14 | return true; 15 | } 16 | 17 | // not logged in so redirect to login page 18 | this.router.navigate(['/Login']); 19 | return false; 20 | } 21 | } -------------------------------------------------------------------------------- /gym-project/src/app/Content/dist/js/sb-admin-2.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function() { 7 | $('#side-menu').metisMenu(); 8 | }); 9 | 10 | //Loads the correct sidebar on window load, 11 | //collapses the sidebar on window resize. 12 | // Sets the min-height of #page-wrapper to window size 13 | $(function() { 14 | $(window).bind("load resize", function() { 15 | var topOffset = 50; 16 | var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width; 17 | if (width < 768) { 18 | $('div.navbar-collapse').addClass('collapse'); 19 | topOffset = 100; // 2-row-menu 20 | } else { 21 | $('div.navbar-collapse').removeClass('collapse'); 22 | } 23 | 24 | var height = ((this.window.innerHeight > 0) ? this.window.innerHeight : this.screen.height) - 1; 25 | height = height - topOffset; 26 | if (height < 1) height = 1; 27 | if (height > topOffset) { 28 | $("#page-wrapper").css("min-height", (height) + "px"); 29 | } 30 | }); 31 | 32 | var url = window.location; 33 | // var element = $('ul.nav a').filter(function() { 34 | // return this.href == url; 35 | // }).addClass('active').parent().parent().addClass('in').parent(); 36 | var element = $('ul.nav a').filter(function() { 37 | return this.href == url; 38 | }).addClass('active').parent(); 39 | 40 | while (true) { 41 | if (element.is('li')) { 42 | element = element.parent().addClass('in').parent(); 43 | } else { 44 | break; 45 | } 46 | } 47 | }); 48 | -------------------------------------------------------------------------------- /gym-project/src/app/Content/dist/js/sb-admin-2.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Start Bootstrap - SB Admin 2 v3.3.7+1 (http://startbootstrap.com/template-overviews/sb-admin-2) 3 | * Copyright 2013-2016 Start Bootstrap 4 | * Licensed under MIT (https://github.com/BlackrockDigital/startbootstrap/blob/gh-pages/LICENSE) 5 | */ 6 | $(function(){$("#side-menu").metisMenu()}),$(function(){$(window).bind("load resize",function(){var i=50,n=this.window.innerWidth>0?this.window.innerWidth:this.screen.width;n<768?($("div.navbar-collapse").addClass("collapse"),i=100):$("div.navbar-collapse").removeClass("collapse");var e=(this.window.innerHeight>0?this.window.innerHeight:this.screen.height)-1;e-=i,e<1&&(e=1),e>i&&$("#page-wrapper").css("min-height",e+"px")});for(var i=window.location,n=$("ul.nav a").filter(function(){return this.href==i}).addClass("active").parent();;){if(!n.is("li"))break;n=n.parent().addClass("in").parent()}}); -------------------------------------------------------------------------------- /gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/saineshwar/Angular-7-Project-with-ASP.NET-CORE-APIS/3ada8f4c6842ed956a6160b4697710c35e13eb4e/gym-project/src/app/Content/vendor/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /gym-project/src/app/Content/vendor/datatables-plugins/dataTables.bootstrap.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | DataTables Bootstrap 3 integration 3 | ©2011-2014 SpryMedia Ltd - datatables.net/license 4 | */ 5 | (function(){var f=function(c,b){c.extend(!0,b.defaults,{dom:"<'row'<'col-sm-6'l><'col-sm-6'f>><'row'<'col-sm-12'tr>><'row'<'col-sm-6'i><'col-sm-6'p>>",renderer:"bootstrap"});c.extend(b.ext.classes,{sWrapper:"dataTables_wrapper form-inline dt-bootstrap",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm"});b.ext.renderer.pageButton.bootstrap=function(g,f,p,k,h,l){var q=new b.Api(g),r=g.oClasses,i=g.oLanguage.oPaginate,d,e,o=function(b,f){var j,m,n,a,k=function(a){a.preventDefault(); 6 | c(a.currentTarget).hasClass("disabled")||q.page(a.data.action).draw(!1)};j=0;for(m=f.length;j",{"class":r.sPageButton+" "+ 7 | e,"aria-controls":g.sTableId,tabindex:g.iTabIndex,id:0===p&&"string"===typeof a?g.sTableId+"_"+a:null}).append(c("",{href:"#"}).html(d)).appendTo(b),g.oApi._fnBindAction(n,{action:a},k))}};o(c(f).empty().html('