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.
DS7/BookingJieFeng/Models/SubAccountListViewModel.cs

43 lines
1.0 KiB
C#

3 years ago
using AutoMapper;
using BookingJieFeng.DB.Model;
using Resources;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
namespace BookingJieFeng.Models
{
public class SubAccountListViewModel
{
public string GID { get; set; }
public string NAME { get; set; }
public string TEL { get; set; }
public string MOBILE { get; set; }
public string PASSWORD { get; set; }
public string EMAIL { get; set; }
public string STATUS { get; set; }
public string REMARK { get; set; }
}
public static class SubAccountListViewModelExt
{
public static SubAccountListViewModel AsListViewModel(this SysUser model)
{
return Mapper.Map<SubAccountListViewModel>(model);
}
public static List<SubAccountListViewModel> AsListViewModelList(this IEnumerable<SysUser> model)
{
return Mapper.Map<List<SubAccountListViewModel>>(model);
}
}
}