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(user); } public static CurrentCompany AsCurrentCompany(this SysUser user) { return Mapper.Map(user); } } }