Beispiel #1
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="address">客户地址领域实体对象</param>
 public CustomerAddressEditModel(Entity.CustomerAddress address)
 {
     this.Id      = address.Id;
     this.Address = address.Address;
     this.Linkman = address.Linkman;
     this.Mobile  = address.Mobile;
 }
Beispiel #2
0
 /// <summary>
 /// 构造函数
 /// </summary>
 /// <param name="address">客户地址领域实体对象</param>
 public CustomerAddressPageModel(Entity.CustomerAddress address)
 {
     this.Id        = address.Id;
     this.Address   = address.Address;
     this.IsDefault = address.IsDefault;
     this.Linkman   = address.Linkman;
     this.Mobile    = address.Mobile;
 }
Beispiel #3
0
        /// <summary>
        /// 添加新客户
        /// </summary>
        /// <param name="name">姓名</param>
        /// <param name="nickname">呢称</param>
        /// <param name="mobile">手机号</param>
        /// <param name="address">地址</param>
        /// <param name="weChatId">微信Id</param>
        /// <param name="groupId">分组Id</param>
        /// <param name="creator">创建人</param>
        public void Create(string name, string nickname, string mobile, string address, string weChatId, string groupId, string creator)
        {
            base.Create(creator);
            this.Name     = name.Trim();
            this.Nickname = DataConvert.ConvertNullToEmptyString(nickname);
            this.Mobile   = mobile.Trim();
            this.WeChatId = DataConvert.ConvertNullToEmptyString(weChatId);
            this.GroupId  = groupId;
            CustomerAddress customerAddress = new CustomerAddress();
            string          linkman         = this.Name;

            if (string.IsNullOrWhiteSpace(linkman))
            {
                linkman = this.Nickname;
            }
            customerAddress.Create(this.Id, address, this.Mobile, linkman, Constant.COMMON_Y, creator);
            this.Addresses.Add(customerAddress);
        }