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.
44 lines
1.1 KiB
C#
44 lines
1.1 KiB
C#
using AutoMapper;
|
|
using BookingWeb.DB.Model;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
|
|
namespace BookingWeb.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 CLIENT_ID { 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 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);
|
|
}
|
|
}
|
|
} |