Base solution for your next web application
Ends in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "[email protected]"

input class public class CreateOrEditAvailabilityDto : EntityDto<int?> {

    public DateTime Day { get; set; }

    public DateTime Time { get; set; }

    public DateTime Datetime { get; set; }

    public bool Generated { get; set; }

    public string Timezone { get; set; }

    public AvailabilityStatusEnum Status { get; set; }

    public int SpecialistId { get; set; }

    public int ProductTypeId { get; set; }

}

**save function**
 public JsonResult SaveCalendar([FromBody] List&lt;CalendarItem&gt; list)
    {
        var OrgList = list.FindAll(x => x.type != "none" && x.type != "" && x.Id == 0);
        foreach (var item in OrgList)
        {
            CreateOrEditAvailabilityDto calendarItem = new CreateOrEditAvailabilityDto();

            calendarItem.Day = DateTime.Parse(item.day);
            calendarItem.Time = DateTime.Parse(item.time);
            calendarItem.Datetime =calendarItem.Datetime;
            calendarItem.SpecialistId = 0;
            calendarItem.Status = AvailabilityStatusEnum.Available;
            _availabilitiesAppService.CreateOrEdit(calendarItem);
        }
        return Json(list);
    }
    
   ** AppService method**
    
     protected virtual async Task Create(CreateOrEditAvailabilityDto input)
    {
        var availability = ObjectMapper.Map&lt;Availability&gt;(input);

        if (AbpSession.TenantId != null)
        {
            availability.TenantId = (int?)AbpSession.TenantId;
        }

        if (input.SpecialistId == 0)
        {
            availability.SpecialistId = _lookup_specialistRepository.FirstOrDefault(x => x.UserId == AbpSession.UserId).Id;
        }

        await _availabilityRepository.InsertAsync(availability);

    }

Hi,

in cshtml

Ive noticed that creationtime,lastmodificationdatetime are being converted to UTC, but any other custom dates no, and kindly note that am working with the Public project and ive implemeted the clock provider in both the MVC and Public projects.

and librarysettings is not being render and if i call it from the layout abp.clock.provider.supportsMultipleTimezone is coming undefined

Showing 1 to 3 of 3 entries