Exemple #1
0
 /// <summary>
 /// 创建分组
 /// </summary>
 /// <param name="name">名称</param>
 /// <param name="remark">备注</param>
 /// <param name="creator">创建人</param>
 public void Create(string name, string remark, string creator)
 {
     base.Create(creator);
     this.IsDefault = Constant.COMMON_N;
     this.Name      = name.Trim();
     this.Remark    = DataConvert.ConvertNullToEmptyString(remark);
 }
Exemple #2
0
 /// <summary>
 /// 更新客户
 /// </summary>
 /// <param name="name">姓名</param>
 /// <param name="nickname">呢称</param>
 /// <param name="mobile">手机号</param>
 /// <param name="weChatId">微信Id</param>
 /// <param name="groupId">分组Id</param>
 /// <param name="mender">修改人</param>
 public void Update(string name, string nickname, string mobile, string weChatId, string groupId, string mender)
 {
     base.Update(mender);
     this.Name     = name.Trim();
     this.Nickname = DataConvert.ConvertNullToEmptyString(nickname);
     this.Mobile   = mobile.Trim();
     this.WeChatId = DataConvert.ConvertNullToEmptyString(weChatId);
     this.GroupId  = groupId;
 }
Exemple #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);
        }
Exemple #4
0
 /// <summary>
 /// 更新分组
 /// </summary>
 /// <param name="name">名称</param>
 /// <param name="remark">备注</param>
 /// <param name="mender">修改人</param>
 public void Update(string name, string remark, string mender)
 {
     base.Update(mender);
     this.Name   = name.Trim();
     this.Remark = DataConvert.ConvertNullToEmptyString(remark);
 }