对象:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
namespace test.Dto
{
/// <summary>
/// 用户来源
/// </summary>
public enum UserSource
{
/// <summary>
/// 自由注册
/// </summary>
[DescriptionAttribute("自由注册")]
FreeReg,
/// <summary>
/// QQ
/// </summary>
[DescriptionAttribute("QQ")]
QQ,
/// <summary>
/// 新浪微博
/// </summary>
[DescriptionAttribute("新浪微博")]
Sina,
/// <summary>
/// 增值用户
/// </summary>
[DescriptionAttribute("增值用户")]
ZengZhi
}
/// <summary>
/// 用户类型
/// </summary>
public enum UserType
{
/// <summary>
/// 买家
/// </summary>
[DescriptionAttribute("买家")]
BUYER = 0,
/// <summary>
/// 卖家
/// </summary>
[DescriptionAttribute("卖家")]
SELLER = 1
}
/// <summary>
/// 用户注册
/// </summary>
[DataContract]
public class UserRegDto
{
/// <summary>
/// 注册方式 0自由注册 1QQ 2新浪微博
/// </summary>
[DataMember]
public int RegType { get; set; }
/// <summary>
/// 登录账号
/// </summary>
[DataMember]
public LoginDto Login { get; set; }
/// <summary>
/// 密码
/// </summary>
[DataMember]
public string Pwd { get; set; }
/// <summary>
/// 昵称
/// </summary>
[DataMember]
public string NickName { get; set; }
/// <summary>
/// 电话
/// </summary>
[DataMember]
public string Phone { get; set; }
/// <summary>
/// 邮箱
/// </summary>
[DataMember]
public string Email { get; set; }
/// <summary>
/// 用户来源
/// </summary>
[DataMember]
public string Source { get; set; }
/// <summary>
/// 性别 0未知1男2女
/// </summary>
[DataMember]
public int Gender { get; set; }
}
}
接口
<pre name="code" class="csharp">using EnYuan.BSS.Area.Dto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.Text;
using System.Threading.Tasks;
namespace test.areas
{
[ServiceContract]
public interface IAreaService
{
/// <summary>
/// 获取省份列表
/// </summary>
/// <returns></returns>
[OperationContract]
List<AreaDto> ListProvince();
/// <summary>
/// 获取城市列表
/// </summary>
/// <param name="province"></param>
/// <returns></returns>
[OperationContract]
List<AreaDto> ListCity(string province);
/// <summary>
/// 按拼音获取城市列表
/// </summary>
/// <param name="py"></param>
/// <returns></returns>
[OperationContract]
List<AreaDto> ListCityByPY(string py);
/// <summary>
/// 获取地区列表
/// </summary>
/// <param name="province"></param>
/// <param name="city"></param>
/// <returns></returns>
[OperationContract]
List<AreaDto> ListArea(string province, string city);
/// <summary>
/// 按名称查询地区详情
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
[OperationContract]
AreaDto GetArea(string name);
/// <summary>
/// 农历转公历日期
/// </summary>
/// <param name="year"></param>
/// <param name="month"></param>
/// <param name="day"></param>
/// <returns></returns>
[OperationContract]
DateTime GetChinaCalendar(DateTime dt);
}
}