| | |
| | | { |
| | | private TreeDiagramRecordBLL _acc = new TreeDiagramRecordBLL(); |
| | | /// <summary> |
| | | ///获取地区智能体数据 |
| | | ///获取查询历史数据 |
| | | /// </summary> |
| | | /// <param name="CompanyName"></param> |
| | | /// <returns></returns> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | ///添加智能体 |
| | | ///添加历史数据 |
| | | /// </summary> |
| | | /// <param name="Keyword"></param> |
| | | /// <returns></returns> |
| | |
| | | { |
| | | try |
| | | { |
| | | bool isDeleted = _acc.AddTreeDiagramRecord(treeDiagramRecord); |
| | | return isDeleted ? SuccessNoShow() : Error(); |
| | | var list = _acc.GetTreeDiagramRecordIsName(treeDiagramRecord.CompanyName); |
| | | if (list.Count == 0) |
| | | { |
| | | bool isAdd = _acc.AddTreeDiagramRecord(treeDiagramRecord); |
| | | return isAdd ? SuccessNoShow() : Error(); |
| | | } |
| | | return SuccessNoShow(data: null); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | ///修改历史数据 |
| | | /// </summary> |
| | | /// <param name="Keyword"></param> |
| | | /// <returns></returns> |
| | | [HttpPost] |
| | | public ActionResult UpdateTreeDiagramRecord(TreeDiagramRecord treeDiagramRecord) |
| | | { |
| | | try |
| | | { |
| | | var list = _acc.GetTreeDiagramRecordIsName(treeDiagramRecord.CompanyName); |
| | | if (list != null && list.Count != 0) |
| | | { |
| | | bool isUpdata = _acc.UpdateTreeDiagramRecord(treeDiagramRecord); |
| | | return isUpdata ? SuccessNoShow() : Error(); |
| | | } |
| | | else { |
| | | bool isUpdata = _acc.AddTreeDiagramRecord(treeDiagramRecord); |
| | | } |
| | | return SuccessNoShow(data: null); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | LogHelper.Write(Level.Error, "修改智能体 UpdateTreeDiagramRecord" + |
| | | "" + |
| | | "", e, OperatorProvider.Instance.Current == null ? "GuestEx" : OperatorProvider.Instance.Current.LoginName); |
| | | return Error(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |