小编Jay*_*thy的帖子

ASP.Net MVC中长时间运行的服务器调用的进度条

我只想在长时间运行服务器调用时创建进度条.当控制器执行长时间运行的作业时,我无法向控制器创建ajax post请求.

我想创建一个额外的操作来获取当前长时间运行任务的实际声明.我尝试在ajax请求中创建轮询,然后我可以从服务器端返回状态并将其显示在客户端进度条中.有任何想法吗 ?

asp.net ajax asp.net-mvc

20
推荐指数
1
解决办法
5万
查看次数

在kendo内联编辑中仅显示日期选择器而不是日期时间选择器

我有一个问题是在kendo内联编辑中显示datepicker.它始终显示日期时间选择器.

columns.Bound(k => k.datefrom).ClientTemplate("#= (datefrom == null) ? ' ' : kendo.toString(datefrom, 'dd.MM.yyyy') #").Width(150);
Run Code Online (Sandbox Code Playgroud)

我也尝试过这样的

columns.Bound(k => k.datefrom).ClientTemplate("#= (datefrom == null) ? ' ' : kendo.toString(datefrom, 'dd.MM.yyyy') #").Format("{0:d}").Width(150); 
Run Code Online (Sandbox Code Playgroud)

任何的想法?

asp.net-mvc datepicker inline-editing kendo-ui

5
推荐指数
1
解决办法
5918
查看次数

AutoMapper IValueResolver 抛出错误该类型不能用作泛型类型或方法中的类型参数“TValueResolver”

我尝试在新版本的 AutoMapper 中实现 IValueResolver 接口。我已经实现了 ResourceTypeResolver 类如下..

public interface IValueResolver<in TSource, in TDestination, TDestMember>
{
    TDestMember Resolve(TSource source, TDestination destination, TDestMember destMember, ResolutionContext context);
}

public class ResourceTypeResolver : IValueResolver<PMEasy.Model.Entity.Resource, PMEasy.Web.Models.Gantt.GanttResource, string>
{
    private ILookupService LookupService;
    public ResourceTypeResolver(ILookupService lookupService)
    {
        LookupService = lookupService;
    }
    public string Resolve(PMEasy.Model.Entity.Resource source, PMEasy.Web.Models.Gantt.GanttResource destination, string member, ResolutionContext context)
    {
        if (source.Type.HasValue && source.Type != Guid.Empty)
        {
            var resourceType = LookupService.GetLookupListByName("ResourceType").Where(con => con.GUID == source.Type.Value).FirstOrDefault();
            return resourceType != null ? resourceType.Value : string.Empty;
        }
        else …
Run Code Online (Sandbox Code Playgroud)

c# automapper automapper-5

2
推荐指数
1
解决办法
2439
查看次数