Base solution for your next web application

Activities of "paul.bose"

Answer

Hi Ismcagdas,

MVC 5.x

Question

Hello AspNetZero

I would like to add Kendo UI in aspnetzero. explained the the issue below.

in the layout.cshtml head tag included below CSS

@Html.IncludeStyle("~/Views/Layout/layout.css")
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2018.3.1017/styles/kendo.common-bootstrap.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2018.3.1017/styles/kendo.bootstrap.min.css" />

And in the bottom Telerik UI script, usually this part should go up in head tag, but in does seem appropriate to leave it in bottom in aspnetzero, but tried moving it in head tag. issue still exist.

@Scripts.Render("~/Bundles/Frontend/metronic/js")
@Scripts.Render("~/Bundles/Common/js")
**<script src="http://kendo.cdn.telerik.com/2018.3.1017/js/kendo.all.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2018.3.1017/js/kendo.aspnetmvc.min.js"></script>**

And project also have all the folders, DLL, Web config updated as instructed by Telerik. in view page here is the code for testing. @(Html.Kendo().DatePicker().Name("CloseDate"))

No error on compiling, but on runtime , it just showing the textbox

In chrome console, it says Kendo is not define, i tried moving script part to the head after referring jquery, it gives another error, in the end issue seems unresolved.

Would you please join online meeting to resolve this issue?

Apsnet Zero version: 7.0.0.0 Ms.Aspnet.MVC : 5.2.6 Kendo Version : 2018 - R3

Thanks Paul

"7.0.0.0"

Question

Hello Engineers,

In MVC5 UI, followed your code, and created date control

<input type="date" name="DateOccurred" class="form-control@(Model.CreateCaseDto.DateOccurred.ToShortDateString().IsNullOrEmpty() ? " value="@Model.CreateCaseDto.DateOccurred" maxlength="10">
<label>@L("DateOccurred")</label>

The issues is that when you lost focus (move on to next) control the label overlapps, please check below images

Thank you, it works, I guess adding seed data in 'TestDatas' folder is missing MVC+Jquery Doc.

Hi There, I'm new to ASPNET Zero

Here is my code, let me know why application service(GetCaseDetail) not returning data, However Code first migration and seed works fine. I'm okay if you want to do online meeting. Thanks

Core:

 [Table("HtrCaseDetail")]
    public class CaseDetailData : FullAuditedEntity
    {
    all properties
    }
    
  EF:  
     public class HomicideDbContext : AbpZeroDbContext<Tenant, Role, User>
    {
        /* Define an IDbSet for each entity of the application */

        public virtual IDbSet<BinaryObject> BinaryObjects { get; set; }

        public virtual IDbSet<Friendship> Friendships { get; set; }

        public virtual IDbSet<ChatMessage> ChatMessages { get; set; }

        public virtual IDbSet<CaseDetailData> CaseDetailDatas { get; set; }

        public HomicideDbContext()
            : base("Default")
        {
            
        }
}

Application:

Dto:

     [AutoMapFrom(typeof(CaseDetailData))]
    public class CasedetailListDto : FullAuditedEntityDto
    {
        All Props
    }

 public class GetCaseDetailInput
    {
        public string Filter { get; set; }
    }
    
      public interface ICaseDetailAppService : IApplicationService
    {
        ListResultDto<CasedetailListDto> GetCaseDetail(GetCaseDetailInput input);
    }
    
      class CaseDetailAppService : HomicideAppServiceBase, ICaseDetailAppService
    {

        private readonly IRepository<CaseDetailData> _caseDetailRepository;

        public CaseDetailAppService(IRepository<CaseDetailData> caseDetailRepository)
        {
            _caseDetailRepository = caseDetailRepository;
        }

        public ListResultDto<CasedetailListDto> GetCaseDetail(GetCaseDetailInput input)
        {
            var caseDetails = _caseDetailRepository
                    .GetAll().ToList();
                   

            return new ListResultDto<CasedetailListDto>(ObjectMapper.Map<List<CasedetailListDto>>(caseDetails));

            //throw new NotImplementedException();
        }
    }

Unit test:

 public class CaseDetailAppService_Tests:AppTestBase
    {
        private readonly ICaseDetailAppService _caseDetailAppService;
        public CaseDetailAppService_Tests()
        {
            _caseDetailAppService = Resolve<ICaseDetailAppService>();
        }

        [Fact]
        public void GetAllCasedetail()
        {
            //Act
           var vCaseDetails = _caseDetailAppService.GetCaseDetail(new GetCaseDetailInput());

            //Assert
            vCaseDetails.Items.Count.ShouldBe(2);

        }
    }
Showing 1 to 6 of 6 entries