Hi,
Refresh command provided as part for ASPNETZero application for Angular application generate proxy in .ts file. I would like to generate the API proxy for C# client application. Is there any way to to do this?
Thanks for your help
Is there a way to move left side menu bar to the top of the screen along with logo? If not, I am looking for a theme with full screen with top menu bar. Do you have any Metronic theme recommendation? Thanks for your help.
Downloaded demo61 theme from Metronic. I followed the documentation from (https://docs.aspnetzero.com/en/aspnet-core-angular/latest/Adding-New-Metronic-Theme-Angular). still did not work. I noticed in ASPNETZero angular application, In the bundles.json file there is an input ad output for existing themes. { "output": "src/assets/common/styles/themes/theme13/metronic-customize.min.css", "input": [ "src/assets/common/styles/themes/theme13/metronic-customize.css" ]
demo61 theme does not have metronic-customize.min.css & metronic-customize.css. How do I generate these from the demo61 theme. How do I incorporate that into angular application. Am I missing something?
Thanks for you help.
We are using latest version of angular application with tenant management. If server is down, and API request is sent to the server from angular client, application is not displaying the error page. The hour glass just keeps spinning on the browser (chrome). I tried this with user list page. Could you please take a look at this and provide the solution.
Hi ,
We would like incorporate below Metronic template in our Angular project. What is the best way as I see in Metronic download file, we get only 13 demos as part of download. https://preview.keenthemes.com/metronic8/demo61/index.html?mode=light
Appreciate any help and pointers to the documentation.
Thank you!
Hi Guys,
I was playing around with Theme2 and what I would like to achieve is like this..
Topbar menu items should be moved to menu dropdown(which is in Theme2 demo on Metronic https://keenthemes.com/metronic/preview/angular/demo2/) and remove top bar completly which will gain some real estate on the screen.Currently, too much of scrolling. The reason I am asking is, I have side bar for each area I am in (like Human resources, customent relationship,Adminstration etc in dropdown menu) so I don't need to show topbar at all once the user is in that area. To go to another area, user can select that area from menu dropdown.
I have the same problem with defualt theme too. Side bar changes based on each area I am in. Showing the main side bar only takes up some valued realestate and shows mulitple side bars and squeezes the content area.
Please suggest on how to acheve this behaviour.(Angular version)
Thanks
When 6.3.1 is dowloaded I get "Virus detected" in Windows defender. When I open the windows defender, I see this is related to Trojan:Win32/Cloxer.D!cl
As per this article I am not sure, I can take the copy of 6.3.1.
https://quickremovevirus.com/how-to-remove-trojanwin32-cloxer-dcl-solved/
Please clean it up so that we can feel safe to download the file.
PS: Previous post with the same subject was closed by the person who raised the issue. But, i am concerned with the issue.
Thanks
Here is the scenario...
Entities
public partial class **BenefitEnrolmentRule** : FullAuditedEntity, IMustHaveTenant
{
public BenefitEnrolmentRule()
{
DependentEnrolmentRules = new HashSet<DependentEnrolmentRule>();
}
[Key]
[Column(Order = 1)]
public int TenantId { get; set; }
[Key]
[Column("BenefitEnrolmentRuleId", Order = 2)]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public override int Id { get; set; }
public bool? TrapLate { get; set; }
[Required]
[Column(TypeName = "char(3)")]
public string GracePeriod { get; set; }
public byte[] RecordVersion { get; set; }
[InverseProperty("BenefitEnrolmentRule")]
public ICollection<DependentEnrolmentRule> DependentEnrolmentRules { get; set; }
}
}
public partial class **DependentEnrolmentRule** : Entity<short>, IMustHaveTenant
{
[Key]
[Column(Order = 1)]
public int TenantId { get; set; }
[Key]
[Column("BenefitEnrolmentRuleId", Order = 2)]
public int BenefitEnrolmentRuleId { get; set; }
[Key]
[Column("Dependent", Order = 3)]
public override short Id { get; set; }
[Column(TypeName = "char(3)")]
public string WaitingPeriod { get; set; }
public short StartDateCalc { get; set; }
public int TerminationAge { get; set; }
public short TerminationDateCalc { get; set; }
[ForeignKey("TenantId,BenefitEnrolmentRuleId")]
[InverseProperty("DependentEnrolmentRules")]
public BenefitEnrolmentRule BenefitEnrolmentRule { get; set; }
}
}
Dto....
public class **BenefitEnrolmentRuleDto**
{
BenefitEnrolmentRuleDto()
{
}
public int TenantId { get; set; }
public int Id { get; set; }
public int BenefitOptionId { get; set; }
public bool? TrapLate { get; set; }
[Required]
public string GracePeriod { get; set; }
public List<DependentEnrolmentRuleCreateInputDto> DependentEnrolmentRules { get; set; }
}
public class **DependentEnrolmentRuleCreateInputDto**
{
DependentEnrolmentRuleCreateInputDto()
{
}
public int TenantId { get; set; }
public int BenefitEnrolmentRuleId { get; set; }
public short Dependent { get; set; }
public string WaitingPeriod { get; set; }
public short StartDateCalc { get; set; }
public int TerminationAge { get; set; }
public short TerminationDateCalc { get; set; }
public bool isEligible { get; set; }
}
Update Method
public async Task UpdateBenefitEnrolmentRule(BenefitEnrolmentRuleDto input)
{
var benefitEnrolmentRule = await _benefitEnrolmentRepository.GetAll()
.Include(e => e.DependentEnrolmentRules)
.Where(e => e.Id == input.Id)
.SingleOrDefaultAsync();
ObjectMapper.Map(input, benefitEnrolmentRule);
await _benefitEnrolmentRepository.UpdateAsync(benefitEnrolmentRule);
}
Data from Angualar client (Dto)
BenefitEnrolmentRules={
"tenantId":2,
"id":32,
"benefitOptionId":0,
"trapLate":true,
"gracePeriod":"04D",
"dependentEnrolmentRules":[
{
"tenantId":2,
"benefitEnrolmentRuleId":32,
"dependent":1,
"waitingPeriod":"02D",
"startDateCalc":1,
"terminationAge":3,
"terminationDateCalc":1,
"isEligible":true
}
]
}
After this statement in the update method var benefitEnrolmentRule = await _benefitEnrolmentRepository.GetAll() .Include(e => e.DependentEnrolmentRules) .Where(e => e.Id == input.Id) .SingleOrDefaultAsync();
After this statement in the update method ObjectMapper.Map(input, benefitEnrolmentRule);
After last statement in update method await _benefitEnrolmentRepository.UpdateAsync(benefitEnrolmentRule);
Checking the profiler,
SQL profiler Statements exec sp_executesql N'SET NOCOUNT ON; UPDATE [BenefitEnrolmentRule] SET [CreationTime] = @p0, [CreatorUserId] = @p1, [DeleterUserId] = @p2, [DeletionTime] = @p3, [GracePeriod] = @p4, [IsDeleted] = @p5, [LastModificationTime] = @p6, [LastModifierUserId] = @p7, [TrapLate] = @p8 WHERE [TenantId] = @p9 AND [BenefitEnrolmentRuleId] = @p10 AND [RecordVersion] = @p11; SELECT [RecordVersion] FROM [BenefitEnrolmentRule] WHERE @@ROWCOUNT = 1 AND [TenantId] = @p9 AND [BenefitEnrolmentRuleId] = @p10; ',N'@p9 int,@p10 int,@p0 datetime2(7),@p1 bigint,@p2 bigint,@p3 datetime2(7),@p4 varchar(3),@p5 bit,@p6 datetime2(7),@p7 bigint,@p11 varbinary(8),@p8 bit',@p9=2,@p10=32,@p0='2018-10-23 15:49:20.5956672',@p1=3,@p2=NULL,@p3=NULL,@p4='04D',@p5=0,@p6='2018-10-23 16:52:05.2990144',@p7=3,@p11=0x000000000000568D,@p8=1
exec sp_executesql N'SET NOCOUNT ON; UPDATE [DependentEnrolmentRule] SET [TerminationAge] = @p0, [WaitingPeriod] = @p1 WHERE [TenantId] = @p2 AND [BenefitEnrolmentRuleId] = @p3 AND [Dependent] = @p4; SELECT @@ROWCOUNT; ',N'@p2 int,@p3 int,@p4 smallint,@p0 int,@p1 varchar(3)',@p2=2,@p3=32,@p4=1,@p0=3,@p1='02D'
exec sp_executesql N'SET NOCOUNT ON; **DELETE FROM [DependentEnrolmentRule] WHERE [TenantId] = @p0 AND [BenefitEnrolmentRuleId] = @p1 AND [Dependent] = @p2; SELECT @@ROWCOUNT; ',N'@p0 int,@p1 int,@p2 smallint',@p0=2,@p1=32,@p2=1 ** Problem: In UpdateAsync method, it is updating the DependentEnrolmentRule and next step is, it is deleting the same record (see sql profile statements). Not sure why.
One reason I was thinking is, In GetAll, BenefitEnrolmentRule object in the DependentEnrolmentRule (which is associated by FK) has data and after mapping with input object,BenefitEnrolmentRule in the DependentEnrolmentRule is null.
Please let me know how to fix this issue. I have posted all the code here. Really appreciate your help.
Thanks
Hi Guys,
I noticed the DTO object transfered to Angular has different map when it comes to child object.
Here is the issue.. API return dto BenefitOptionDto in quick watch
JSON on Angular.
{
"tenantId":2,
"id":4,
"classBenefitId":9,
"optionCode":"Option2",
"optionDescriptionEn":"Option2 Desc",
"isActive":true,
"benefitOptionPlans":[
{
"tenantId":2,
"id":4,
"benefitOptionId":4,
"ruleType":0,
"fromDate":"1900-01-01T05:00:00.000Z",
"ruleId":null
},
{
"benefitEnrolmentRule":{
"tenantId":2,
"id":2,
"trapLate":true,
"gracePeriod":"01M",
"dependentEnrolmentRules":[
{
"tenantId":2,
"benefitEnrolmentRuleId":2,
"dependent":1,
"waitingPeriod":"01D",
"startDateCalc":1,
"terminationAge":2,
"terminationDateCalc":1,
"terminationMonth":3,
"terminationDay":4,
"isEligible":false
}
],
"employmentRules":[
{
"tenantId":2,
"benefitEnrolmentRuleId":2,
"employmentType":1,
"minHours":3,
"frequency":1
}
],
"trappingRules":[
{
"tenantId":2,
"benefitEnrolmentRuleId":2,
"trappingCondition":2,
"nonEvidenceLimit":4,
"age":5,
"covBeforeDecision":1
}
]
},
"tenantId":2,
"id":5,
"benefitOptionId":4,
"ruleType":2,
"fromDate":"1900-01-01T05:00:00.000Z",
"ruleId":2
}
],
"isDefaultOption":false
}
If you compare both screen shot and JSON, "benefitEnrolmentRule" object should have been in the "ruleType":2 segment of benefitOptionPlans not "ruleType":0,.
This seems to be a big problem is parsing and serializing. Please help!
Thanks
Hi Guys,
This issue may or may not be ANZ issue. Appreciate your help
var benefitOption = await _benefitOptionRepository.GetAsync(input.Id);
benefitOption.BenefitOptionPlans = _benefitOptionPlanRepository.GetAll()
.Where(e => e.BenefitOptionId == input.Id && e.FromDate <= input.AsOfDate)
.OrderByDescending(e => e.FromDate)
.ToList();
BenefitOptionOutputDto benefitOptionOutputDto = ObjectMapper.Map<BenefitOptionOutputDto>(benefitOption);
foreach (BenefitOptionPlanOutputDto d in BenefitOptionOutputDto.BenefitOptionPlans)
{
var benefitEnrolment = _benefitEnrolmentRepository.GetAll()
.Include(e => e.DependentEnrolmentRules)
.Include(e => e.EmploymentRules)
.Include(e => e.TrappingRules)
.Where(e => e.Id == d.RuleId)
.FirstOrDefault<BenefitEnrolmentRule>();
d.BenefitEnrolmentRule = ObjectMapper.Map<BenefitEnrolmentRuleOutputDto>(benefitEnrolment);
}
return benefitOptionOutputDto;
I get "System.InvalidOperationException: There is already an open DataReader associated with this Command which must be closed first." in the foreach loop.
I googled and determined that this can happen if you execute a query while iterating over the results from another query. Couple of suggestions like
I tried different variations to fx this issue with no solution. Realy appreciate your help on this.
Thank you