| | |
| | | using System; |
| | | using System.Web; |
| | | using Dao; |
| | | using Model; |
| | | using Common; |
| | | using System.Collections.Generic; |
| | | using System.Configuration; |
| | |
| | | client.Company = company; |
| | | _Dao.Add(client);//插入数据库。创建账户 |
| | | |
| | | //保存产品记录 |
| | | //获取启用的默认的产品 |
| | | List<string> defaultProductList = GwProductDao.Instance.GetDefaultProduct(); |
| | | if (defaultProductList.Count > 0) |
| | | { |
| | | foreach (string productId in defaultProductList) |
| | | { |
| | | GwClientProduct gcp = new GwClientProduct(); |
| | | gcp.Id = Guid.NewGuid().ToString(); |
| | | gcp.ClientId = clientID; |
| | | gcp.ProductId = productId; |
| | | GwClientProductDao.Instance.Add(gcp); |
| | | } |
| | | } |
| | | |
| | | return new JsonPageResult(true, "创建账户成功!"); |
| | | } |
| | | } |