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.
D7QUANTAI/BookingWeb/Models/SubAccountListViewModel.cs

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);
}
}
}