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.
41 lines
989 B
C#
41 lines
989 B
C#
using AutoMapper;
|
|
using DSWeb.Areas.Dispatch.DB;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace DSWeb.Areas.Dispatch.Models
|
|
{
|
|
public class DriverRegistViewModel
|
|
{
|
|
|
|
public string DriverName { get; set; }
|
|
|
|
public string Tel { get; set; }
|
|
|
|
public string OpenId { get; set; }
|
|
|
|
public string RegName { get; set; }
|
|
|
|
public bool IsAudit { get; set; }
|
|
}
|
|
|
|
public static class DriverRegistExt
|
|
{
|
|
public static DriverInfo AsDriverInfo(this DriverRegistViewModel model)
|
|
{
|
|
return Mapper.Map<DriverInfo>(model);
|
|
}
|
|
|
|
public static DriverInfo AsDriverInfo(this DriverRegistViewModel model, DriverInfo dest)
|
|
{
|
|
return Mapper.Map(model, dest);
|
|
}
|
|
|
|
public static DriverRegistViewModel AsDriverRegistViewModel(this DriverInfo model)
|
|
{
|
|
return Mapper.Map<DriverRegistViewModel>(model);
|
|
}
|
|
}
|
|
} |