You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using AutoMapper;
|
|
using DSWeb.Areas.Dispatch.DB;
|
|
using DSWeb.Dispatch.DAL;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace DSWeb.Areas.Dispatch.Models
|
|
{
|
|
public class DispInfoClientAuditViewModel
|
|
{
|
|
public string GID { get; set; }
|
|
public string Name { get; set; }
|
|
public string Tel { get; set; }
|
|
public string CompanyName { get; set; }
|
|
public bool IsAudit { get; set; }
|
|
public string AuditStatsName { get; set; }
|
|
public string InfoClient { get; set; }
|
|
}
|
|
|
|
public static class DispInfoClientAuditViewModelExt
|
|
{
|
|
public static DispInfoClientAuditViewModel AsAuditViewModel(this DispInfoClient model)
|
|
{
|
|
return Mapper.Map<DispInfoClientAuditViewModel>(model);
|
|
}
|
|
|
|
public static List<DispInfoClientAuditViewModel> AsAuditViewModelList(this IEnumerable<DispInfoClient> model)
|
|
{
|
|
return Mapper.Map<IEnumerable<DispInfoClient>, List<DispInfoClientAuditViewModel>>(model);
|
|
}
|
|
|
|
public static DispInfoClient AsModel(this DispInfoClientAuditViewModel model)
|
|
{
|
|
return Mapper.Map<DispInfoClient>(model);
|
|
}
|
|
|
|
public static DispInfoClient AsModel(this DispInfoClientAuditViewModel model, DispInfoClient dest)
|
|
{
|
|
return Mapper.Map(model, dest);
|
|
}
|
|
}
|
|
} |