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/CurrentUser.cs

44 lines
1.1 KiB
C#

2 years ago
using AutoMapper;
using BookingJieFeng.DB.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
namespace BookingJieFeng.Models
{
[Serializable]
public class CurrentUser
{
public string GID { get; set; }
public string NAME { get; set; }
public string TEL { get; set; }
public string MOBILE { get; set; }
public string EMAIL { get; set; }
}
[Serializable]
public class CurrentCompany
{
public string GID { get; set; }
public string COMPANY_NAME { get; set; }
public string COMPANY_CODE { get; set; }
public string ADDRESS { get; set; }
public string IDENTIFICATION_STATE { get; set; }
public string INFO_CLIENT { get; set; }
public bool REC_BC_MAIL { get; set; }
}
public static class CurrentUserExt
{
public static CurrentUser AsCurrentUser(this SysUser user)
{
return Mapper.Map<CurrentUser>(user);
}
public static CurrentCompany AsCurrentCompany(this SysUser user)
{
return Mapper.Map<CurrentCompany>(user);
}
}
}