43 lines
1.0 KiB
C#
43 lines
1.0 KiB
C#
using AutoMapper;
|
|
using BookingWeb.DB.Model;
|
|
using Resources;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel.DataAnnotations;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace BookingWeb.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);
|
|
}
|
|
}
|
|
} |