Ejemplo n.º 1
0
        public void Submit()
        {
            var user           = Formula.FormulaHelper.GetUserInfo();
            var marketEntities = this.GetMarketContext();

            ////登记一条投标数据
            ////增加一条经营项目数据
            //S_P_MarketClue clue = new S_P_MarketClue();
            //clue.ID = Formula.FormulaHelper.CreateGuid();
            //clue.Address = this.Address;
            //clue.CompanyID = this.CompanyID;
            //clue.CreateDate = DateTime.Now;
            //clue.CreateUser = user.UserName;
            //clue.CreateUserID = user.UserID;
            //clue.DeptInfo = this.DeptInfo;
            //clue.DeptInfoName = this.DeptInfoName;
            //clue.Name = this.ProjectName;
            //clue.OrgID = user.UserOrgID;
            //clue.ProjectClass = this.BusinessClass;
            //clue.State = ClueState.Tracking.ToString();
            //clue.CustomerInfo = this.BusinessOwner;
            //clue.CustomerInfoName = this.BusinessOwnerName;
            //clue.CustomerInfoSub = this.BusinessOwner;
            //clue.CustomerInfoSubName = this.BusinessOwnerName;
            //clue.EngineeringInfo = this.EngineeringInfo;
            //clue.EngineeringInfoName = this.EngineeringInfoName;
            //clue.Save(this);
            //marketEntities.Set<S_P_MarketClue>().Add(clue);
            S_B_Bid bid = new S_B_Bid();

            Formula.FormulaHelper.UpdateEntity <S_B_Bid>(bid, this.ToDic(), false);
            bid.ID = this.Project;
            marketEntities.Set <S_B_Bid>().Add(bid);
            marketEntities.SaveChanges();
        }
Ejemplo n.º 2
0
        protected override void OnFlowEnd(T_B_BidProcessApply entity, Workflow.Logic.Domain.S_WF_InsTaskExec taskExec, Workflow.Logic.Domain.S_WF_InsDefRouting routing)
        {
            base.OnFlowEnd(entity, taskExec, routing);
            S_B_Bid bid = BusinessEntities.Set <S_B_Bid>().Find(entity.BidID);

            if (bid == null)
            {
                throw new BusinessException("id为【" + entity.BidID + "】投标数据为空");
            }
            bid.BidFile      = entity.BidFile;
            bid.BidClearFile = entity.BidClearFile;
            bid.BidOtherFile = entity.BidOtherFile;
            BusinessEntities.SaveChanges();
        }
Ejemplo n.º 3
0
        public void Save(T_B_BidApply tb = null)
        {
            var marketEntities = this.GetMarketContext();
            var user           = Formula.FormulaHelper.GetUserInfo();

            var customer = marketEntities.S_F_Customer.SingleOrDefault(d => d.ID == this.CustomerInfo);

            if (customer != null)
            {
                if (String.IsNullOrEmpty(this.Province))
                {
                    this.Province = customer.Province;
                }
                if (String.IsNullOrEmpty(this.Country))
                {
                    this.Country = customer.Country;
                }
                if (String.IsNullOrEmpty(this.City))
                {
                    this.City = customer.City;
                }
            }

            //登记投标信息
            S_B_Bid bid = new S_B_Bid();

            if (tb != null)
            {
                FormulaHelper.UpdateEntity <S_B_Bid>(bid, tb.ToDic(), false);
            }
            else
            {
                bid.EngineeringInfo     = this.EngineeringInfo;
                bid.EngineeringInfoName = this.EngineeringInfoName;
                bid.BusinessClass       = this.ProjectClass;
                bid.ProjectManager      = this.TechCharger;
                bid.ProjectManagerName  = this.TechChargerName;
                bid.DeptInfo            = this.DeptInfo;
                bid.DeptInfoName        = this.DeptInfoName;
                bid.BusinessOwner       = this.CustomerInfo;
                bid.BusinessOwnerName   = this.CustomerInfoName;
                bid.Project             = this.ID;
                bid.ProjectName         = this.Name;
            }
            bid.ID = this.ID;
            marketEntities.Set <S_B_Bid>().Add(bid);
        }