Ejemplo n.º 1
0
        /// <summary>
        /// 验证保存核实信息
        /// </summary>
        internal void VerifySaveCheckInfo()
        {
            string d = this.CheckedInfo;
            CheckedSecondCarInfo ci = (CheckedSecondCarInfo)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(d, typeof(CheckedSecondCarInfo));

            Entities.ProjectTask_Cust              cust       = null;
            List <Entities.ProjectTask_CSTMember>  cstMembers = null;
            List <Entities.ProjectTask_CSTLinkMan> linkMans   = null;
            List <string> cstMemberBrands = null;

            //校验信息
            ci.Validate(false, out cust, out cstMembers, out linkMans, out cstMemberBrands);
            ci.ValidateOperation();
            if (string.IsNullOrEmpty(ci.CustInfo.DelRelationCustIDs))
            {
                //清空删除申请数据
                BLL.ProjectTask_DelCustRelation.Instance.DeleteByTID(cust.PTID);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 提交核实信息
        /// </summary>
        internal void SubmitCheckInfo()
        {
            string d = this.CheckedInfo;
            CheckedSecondCarInfo ci = (CheckedSecondCarInfo)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(d, typeof(CheckedSecondCarInfo));

            Entities.ProjectTask_Cust              cust       = null;
            List <Entities.ProjectTask_DMSMember>  members    = new List <Entities.ProjectTask_DMSMember>();
            List <Entities.ProjectTask_CSTMember>  cstMembers = null;
            List <Entities.ProjectTask_CSTLinkMan> linkMans   = null;
            List <string> cstMemberBrands = null;

            //校验信息
            ci.Validate(true, out cust, out cstMembers, out linkMans, out cstMemberBrands);
            ci.ValidateOperation();
            //验证是否有权限提交数据
            int currentUserID = BLL.Util.GetLoginUserID();

            //if (!BLL.CallRecordInfo.Instance.IsExistByTID(currentUserID, cust.PTID, 1))
            //{
            //    throw new Exception("必须要有本人的录音才可提交");
            //}
            //if (BLL.CallRecordInfo.Instance.IsExistUnBindByTID(cust.PTID) && cust.CarType != 2)
            //{
            //    throw new Exception("所有录音绑定之后才可提交");
            //}
            if (cust.CarType == 2 && BLL.ProjectTask_DMSMember.Instance.GetProjectTask_DMSMemberByTID(cust.PTID).Count > 0)
            {
                throw new Exception(" 客户经营范围为:二手车时,只能核实车商通会员;");
            }
            //保存核实的信息
            BLL.ProjectTask_Cust.Instance.SubmitCheckedInfo(cust, members, cstMembers, linkMans, cstMemberBrands, DateTime.Now);
            if (string.IsNullOrEmpty(ci.CustInfo.DelRelationCustIDs))
            {
                //清空删除申请数据
                BLL.ProjectTask_DelCustRelation.Instance.DeleteByTID(cust.PTID);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 保存核实信息
        /// </summary>
        internal void SaveCheckInfo()
        {
            string d = this.CheckedInfo;
            CheckedSecondCarInfo ci = (CheckedSecondCarInfo)Newtonsoft.Json.JavaScriptConvert.DeserializeObject(d, typeof(CheckedSecondCarInfo));

            Entities.ProjectTask_Cust              cust       = null;
            List <Entities.ProjectTask_DMSMember>  members    = new List <Entities.ProjectTask_DMSMember>();
            List <Entities.ProjectTask_CSTMember>  cstMembers = null;
            List <Entities.ProjectTask_CSTLinkMan> linkMans   = null;
            List <string> cstMemberBrands = null;

            //List<string> cstMemberBrands = new List<string>();
            //校验信息
            ci.Validate(false, out cust, out cstMembers, out linkMans, out cstMemberBrands);
            if (BLL.ProjectTaskInfo.Instance.TaskBelongToUser(cust.PTID, BLL.Util.GetLoginUserID()) == false)
            {
                throw new Exception("此任务不属于你");
            }
            ci.ValidateOperation();
            //保存核实的信息
            BLL.ProjectTask_Cust.Instance.SaveCheckedInfo(cust, members, cstMembers, linkMans, cstMemberBrands, DateTime.Now);
            //更新附加状态
            BLL.ProjectTaskInfo.Instance.InsertOrUpdateTaskAdditionalStatus(cust.PTID, this.AdditionalStatus, this.DescriptionWhenSave);
        }