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.
47 lines
1.3 KiB
C#
47 lines
1.3 KiB
C#
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 UserRegistViewModel
|
|
{
|
|
[Required(ErrorMessage = "请输入姓名")]
|
|
public string NAME { get; set; }
|
|
//public string TEL { get; set; }
|
|
|
|
[Required(ErrorMessage = "请输入手机号")]
|
|
public string MOBILE { get; set; }
|
|
|
|
[Required(ErrorMessage = "请输入密码")]
|
|
public string PASSWORD { get; set; }
|
|
|
|
[Required(ErrorMessage = "请输入邮箱")]
|
|
public string EMAIL { get; set; }
|
|
|
|
[Required(ErrorMessage = "请输入公司名称")]
|
|
public string COMPANY_NAME { get; set; }
|
|
|
|
public string Captcha { get; set; }
|
|
public string MobileCode { get; set; }
|
|
public bool REC_BC_MAIL { get; set; }
|
|
}
|
|
|
|
public static class UserRegistExt
|
|
{
|
|
public static SysUser AsModel(this UserRegistViewModel viewModel)
|
|
{
|
|
return Mapper.Map<SysUser>(viewModel);
|
|
}
|
|
|
|
public static SysUser AsModel(this UserRegistViewModel viewModel, SysUser model)
|
|
{
|
|
return Mapper.Map<UserRegistViewModel, SysUser>(viewModel, model);
|
|
}
|
|
}
|
|
} |