public DealtViewModel(int id)
        {
            var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeStatusByAuditFlowV1(id, Enumeration.AuditFlowV1Status.InDealt, this.Operater, null, "已取单,正在处理");

            if (bizProcessesAudit != null)
            {
                _bizProcessesAudit = bizProcessesAudit;

                if (_bizProcessesAudit.Auditor.Value != this.Operater)
                {
                    this.IsHasOperater = true;
                    this.OperaterName  = SysFactory.SysUser.GetFullName(_bizProcessesAudit.Auditor.Value);
                }


                var orderToLllegalDealt = CurrentDb.OrderToLllegalDealt.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault();
                if (OrderToLllegalDealt != null)
                {
                    _orderToLllegalDealt = orderToLllegalDealt;

                    var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToLllegalDealt.MerchantId).FirstOrDefault();
                    if (merchant != null)
                    {
                        _merchant = merchant;
                    }


                    var orderToLllegalDealtDetails = CurrentDb.OrderToLllegalDealtDetails.Where(m => m.OrderId == orderToLllegalDealt.Id).ToList();
                    if (orderToLllegalDealtDetails != null)
                    {
                        _orderToLllegalDealtDetails = orderToLllegalDealtDetails;
                    }
                }
            }
        }
Exemplo n.º 2
0
        public VerifyViewModel(int id)
        {
            var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeStatusByAuditFlowV1(id, Enumeration.AuditFlowV1Status.InVerify, this.Operater, null, "已取单,正在核实");

            if (bizProcessesAudit != null)
            {
                _bizProcessesAudit = bizProcessesAudit;

                if (_bizProcessesAudit.Auditor.Value != this.Operater)
                {
                    this.IsHasOperater = true;
                    this.OperaterName  = SysFactory.SysUser.GetFullName(_bizProcessesAudit.Auditor.Value);
                }


                var orderToApplyLossAssess = CurrentDb.OrderToApplyLossAssess.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault();
                if (orderToApplyLossAssess != null)
                {
                    _orderToApplyLossAssess = orderToApplyLossAssess;

                    var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToApplyLossAssess.MerchantId).FirstOrDefault();
                    if (merchant != null)
                    {
                        _merchant = merchant;
                    }
                }
            }
        }
        public VerifyOrderViewModel(int id)
        {
            var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeCarClaimDealtStatus(this.Operater, id, Enumeration.CarClaimDealtStatus.InVerifyOrder);

            if (bizProcessesAudit != null)
            {
                _bizProcessesAudit = bizProcessesAudit;

                if (_bizProcessesAudit.Auditor.Value != this.Operater)
                {
                    this.IsHasOperater = true;
                    this.OperaterName  = SysFactory.SysUser.GetFullName(_bizProcessesAudit.Auditor.Value);
                }


                var orderToCarClaim = CurrentDb.OrderToCarClaim.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault();
                if (orderToCarClaim != null)
                {
                    _orderToCarClaim = orderToCarClaim;

                    var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToCarClaim.MerchantId).FirstOrDefault();
                    if (merchant != null)
                    {
                        _merchant = merchant;
                    }
                }
            }
        }
Exemplo n.º 4
0
        public DetailsByDealtViewModel(int id)
        {
            var orderToLllegalDealt = CurrentDb.OrderToLllegalDealt.Where(m => m.Id == id).FirstOrDefault();

            if (orderToLllegalDealt != null)
            {
                _orderToLllegalDealt = orderToLllegalDealt;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToLllegalDealt.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }


                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToTalentDemand, id);


                var orderToLllegalDealtDetails = CurrentDb.OrderToLllegalDealtDetails.Where(m => m.OrderId == orderToLllegalDealt.Id).ToList();
                if (orderToLllegalDealtDetails != null)
                {
                    _orderToLllegalDealtDetails = orderToLllegalDealtDetails;
                }
            }
        }
        public PrimaryAuditViewModel(int id)
        {
            var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeMerchantAuditStatus(this.Operater, id, Enumeration.MerchantAuditStatus.InPrimaryAudit);

            if (bizProcessesAudit != null)
            {
                _bizProcessesAudit = bizProcessesAudit;


                var merchant = CurrentDb.Merchant.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;


                    if (_merchant.SalesmanId != null)
                    {
                        var salesman = CurrentDb.SysSalesmanUser.Where(m => m.Id == _merchant.SalesmanId).FirstOrDefault();
                        if (salesman != null)
                        {
                            _salesman = salesman;
                        }
                    }

                    var merchantPosMachine = CurrentDb.MerchantPosMachine.Where(m => m.MerchantId == merchant.Id).ToList();
                    if (merchantPosMachine != null)
                    {
                        _merchantPosMachine = merchantPosMachine;

                        foreach (var m in _merchantPosMachine)
                        {
                            var posMachine = CurrentDb.PosMachine.Where(q => q.Id == m.PosMachineId).FirstOrDefault();

                            m.PosMachine = posMachine;
                        }
                    }

                    var bankCard = CurrentDb.BankCard.Where(m => m.MerchantId == merchant.Id).ToList();
                    if (bankCard != null)
                    {
                        _bankCard = bankCard;
                    }

                    var carInsuranceCompany = CurrentDb.CarInsuranceCompany.ToList();
                    if (carInsuranceCompany != null)
                    {
                        _carInsuranceCompany = carInsuranceCompany;
                    }

                    var merchantEstimateCompany = CurrentDb.MerchantEstimateCompany.Where(m => m.MerchantId == merchant.Id).ToList();
                    if (merchantEstimateCompany != null)
                    {
                        _merchantEstimateCompany = merchantEstimateCompany;
                    }
                }
            }
        }
Exemplo n.º 6
0
        public DetailsViewModel(int id)
        {
            var merchant = CurrentDb.Merchant.Where(m => m.Id == id).FirstOrDefault();

            if (merchant != null)
            {
                _merchant = merchant;


                if (_merchant.SalesmanId != null)
                {
                    var salesman = CurrentDb.SysSalesmanUser.Where(m => m.Id == _merchant.SalesmanId).FirstOrDefault();
                    if (salesman != null)
                    {
                        _salesman = salesman;
                    }
                }

                var merchantPosMachine = CurrentDb.MerchantPosMachine.Where(m => m.MerchantId == merchant.Id).ToList();
                if (merchantPosMachine != null)
                {
                    _merchantPosMachine = merchantPosMachine;

                    foreach (var m in _merchantPosMachine)
                    {
                        var posMachine = CurrentDb.PosMachine.Where(q => q.Id == m.PosMachineId).FirstOrDefault();

                        m.PosMachine = posMachine;
                    }
                }

                var merchantEstimateCompany = CurrentDb.MerchantEstimateCompany.Where(m => m.MerchantId == merchant.Id).ToList();
                if (merchantEstimateCompany != null)
                {
                    _merchantEstimateCompany = merchantEstimateCompany;
                }

                var bankCard = CurrentDb.BankCard.Where(m => m.MerchantId == merchant.Id).ToList();
                if (bankCard != null)
                {
                    _bankCard = bankCard;
                }

                var carInsuranceCompany = CurrentDb.CarInsuranceCompany.ToList();
                if (carInsuranceCompany != null)
                {
                    _carInsuranceCompany = carInsuranceCompany;
                }

                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.MerchantAudit, id);
            }
        }
        public DetailsViewModel(int id)
        {
            var orderToCarInsure = CurrentDb.OrderToCarInsure.Where(m => m.Id == id).FirstOrDefault();

            if (orderToCarInsure != null)
            {
                _orderToCarInsure = orderToCarInsure;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToCarInsure.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }

                var orderToCarInsureOfferCompany = CurrentDb.OrderToCarInsureOfferCompany.Where(m => m.OrderId == orderToCarInsure.Id).ToList();
                var insureOfferCompanys          = CurrentDb.Company.ToList();
                if (orderToCarInsureOfferCompany != null)
                {
                    _orderToCarInsureOfferCompany = orderToCarInsureOfferCompany;

                    foreach (var m in _orderToCarInsureOfferCompany)
                    {
                        var insureOfferCompany = insureOfferCompanys.Where(q => q.Id == m.InsuranceCompanyId).FirstOrDefault();
                        if (insureOfferCompany != null)
                        {
                            m.InsuranceCompanyName   = insureOfferCompany.Name;
                            m.InsuranceCompanyImgUrl = insureOfferCompany.ImgUrl;
                        }
                    }
                }

                var orderToCarInsureOfferKind = CurrentDb.OrderToCarInsureOfferKind.Where(m => m.OrderId == orderToCarInsure.Id).ToList();
                var carKinds = CurrentDb.CarKind.ToList();
                if (orderToCarInsureOfferKind != null)
                {
                    _orderToCarInsureOfferKind = orderToCarInsureOfferKind;

                    foreach (var m in _orderToCarInsureOfferKind)
                    {
                        var carKind = carKinds.Where(q => q.Id == m.KindId).FirstOrDefault();
                        if (carKind != null)
                        {
                            m.KindName = carKind.Name;
                            m.KindUnit = carKind.InputUnit;
                        }
                    }
                }

                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToCarInsure, id);
            }
        }
Exemplo n.º 8
0
        public DetailsViewModel(int id)
        {
            var orderToApplyLossAssess = CurrentDb.OrderToApplyLossAssess.Where(m => m.Id == id).FirstOrDefault();

            if (orderToApplyLossAssess != null)
            {
                _orderToApplyLossAssess = orderToApplyLossAssess;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToApplyLossAssess.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }


                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToApplyLossAssess, id);
            }
        }
        public DetailsViewModel(int id)
        {
            var orderToServiceFee = CurrentDb.OrderToServiceFee.Where(m => m.Id == id).FirstOrDefault();

            if (_orderToServiceFee != null)
            {
                _orderToServiceFee = orderToServiceFee;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToServiceFee.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }


                //_bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.SE, id);
            }
        }
        public DetailsViewModel(int id)
        {
            var orderToInsurance = CurrentDb.OrderToInsurance.Where(m => m.Id == id).FirstOrDefault();

            if (orderToInsurance != null)
            {
                _orderToInsurance = orderToInsurance;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToInsurance.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }


                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToCredit, id);
            }
        }
Exemplo n.º 11
0
        public DetailsViewModel(int id)
        {
            var orderToCarClaim = CurrentDb.OrderToCarClaim.Where(m => m.Id == id).FirstOrDefault();

            if (orderToCarClaim != null)
            {
                _orderToCarClaim = orderToCarClaim;

                var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToCarClaim.MerchantId).FirstOrDefault();
                if (merchant != null)
                {
                    _merchant = merchant;
                }

                var estimateMerchant = CurrentDb.Merchant.Where(m => m.Id == orderToCarClaim.HandMerchantId).FirstOrDefault();
                if (estimateMerchant != null)
                {
                    _estimateMerchant = estimateMerchant;
                }

                _bizProcessesAuditDetails = BizFactory.BizProcessesAudit.GetDetails(Enumeration.BizProcessesAuditType.OrderToCarClaim, id);
            }
        }
Exemplo n.º 12
0
        public DealtViewModel(int id)
        {
            var bizProcessesAudit = BizFactory.BizProcessesAudit.ChangeCarInsureOfferDealtStatus(this.Operater, id, Enumeration.CarInsureOfferDealtStatus.InOffer, "报价中");

            if (bizProcessesAudit != null)
            {
                _bizProcessesAudit = bizProcessesAudit;

                if (_bizProcessesAudit.Auditor.Value != this.Operater)
                {
                    this.IsHasOperater = true;
                    this.OperaterName  = SysFactory.SysUser.GetFullName(_bizProcessesAudit.Auditor.Value);
                }



                var orderToCarInsure = CurrentDb.OrderToCarInsure.Where(m => m.Id == bizProcessesAudit.AduitReferenceId).FirstOrDefault();
                if (orderToCarInsure != null)
                {
                    _orderToCarInsure = orderToCarInsure;

                    var merchant = CurrentDb.Merchant.Where(m => m.Id == orderToCarInsure.MerchantId).FirstOrDefault();
                    if (merchant != null)
                    {
                        _merchant = merchant;
                    }

                    var orderToCarInsureOfferCompany = CurrentDb.OrderToCarInsureOfferCompany.Where(m => m.OrderId == orderToCarInsure.Id).ToList();
                    var insureOfferCompanys          = CurrentDb.Company.ToList();
                    if (orderToCarInsureOfferCompany != null)
                    {
                        _orderToCarInsureOfferCompany = orderToCarInsureOfferCompany;

                        foreach (var m in _orderToCarInsureOfferCompany)
                        {
                            var insureOfferCompany = insureOfferCompanys.Where(q => q.Id == m.InsuranceCompanyId).FirstOrDefault();
                            if (insureOfferCompany != null)
                            {
                                m.InsuranceCompanyName   = insureOfferCompany.Name;
                                m.InsuranceCompanyImgUrl = insureOfferCompany.ImgUrl;
                            }
                        }
                    }

                    var orderToCarInsureOfferKind = CurrentDb.OrderToCarInsureOfferKind.Where(m => m.OrderId == orderToCarInsure.Id).ToList();
                    var carKinds = CurrentDb.CarKind.ToList();
                    if (orderToCarInsureOfferKind != null)
                    {
                        _orderToCarInsureOfferKind = orderToCarInsureOfferKind;

                        var isHasCompulsoryPrice = _orderToCarInsureOfferKind.Where(m => m.KindId == 1).FirstOrDefault();
                        if (isHasCompulsoryPrice != null)
                        {
                            _isHasCompulsoryPrice = true;
                        }

                        var isHasTravelTaxPrice = _orderToCarInsureOfferKind.Where(m => m.KindId == 2).FirstOrDefault();
                        if (isHasTravelTaxPrice != null)
                        {
                            _isHasTravelTaxPrice = true;
                        }

                        var isHasCommercialPrice = _orderToCarInsureOfferKind.Where(m => m.KindId >= 3).FirstOrDefault();
                        if (isHasCommercialPrice != null)
                        {
                            _isHasCommercialPrice = true;
                        }


                        foreach (var m in _orderToCarInsureOfferKind)
                        {
                            var carKind = carKinds.Where(q => q.Id == m.KindId).FirstOrDefault();
                            if (carKind != null)
                            {
                                m.KindName = carKind.Name;
                                m.KindUnit = carKind.InputUnit;
                            }
                        }
                    }
                }
            }
        }