Пример #1
0
        public void ChangePrjInfo(PTPrjInfoZTB prjInfoZTB, int prjState, int flowState = 1)
        {
            PTPrjInfoZTBDetailService service = new PTPrjInfoZTBDetailService();
            PTPrjInfoZTBDetail        byId    = service.GetById(prjInfoZTB.PrjGuid.ToString());
            PTPrjInfo item    = this.GetById(prjInfoZTB.PrjGuid.ToString());
            PTPrjInfo prjInfo = this.GetPrjInfo(prjInfoZTB, byId);

            if (item != null)
            {
                item.PrjState = new int?(prjState);
                base.Update(item);
            }
            else
            {
                base.Add(prjInfo);
            }
            byId.SetUpFlowState = new int?(flowState);
            service.Update(byId);
            if (!string.IsNullOrEmpty(prjInfoZTB.ParentTypeCode))
            {
                int?      parentCodeCount = this.GetParentCodeCount(prjInfoZTB.ParentTypeCode);
                PTPrjInfo info3           = (from p in this
                                             where p.TypeCode == prjInfoZTB.ParentTypeCode
                                             select p).FirstOrDefault <PTPrjInfo>();
                info3.i_ChildNum = parentCodeCount;
                base.Update(info3);
            }
        }
Пример #2
0
    protected void btnSave_Click(object sender, System.EventArgs e)
    {
        string value = this.hfldPrjId.Value;

        if (!string.IsNullOrEmpty(value))
        {
            System.Guid               id = new System.Guid(value);
            PTPrjInfoZTBService       pTPrjInfoZTBService       = new PTPrjInfoZTBService();
            PTPrjInfoZTBDetailService pTPrjInfoZTBDetailService = new PTPrjInfoZTBDetailService();
            PTPrjInfoZTB              byId  = pTPrjInfoZTBService.GetById(id);
            PTPrjInfoZTBDetail        byId2 = pTPrjInfoZTBDetailService.GetById(value);
            TenderInfo.GetById(value);
            System.DateTime?successBidDate = null;
            if (!string.IsNullOrEmpty(this.txtSuccessBidDate.Text))
            {
                successBidDate = new System.DateTime?(System.Convert.ToDateTime(this.txtSuccessBidDate.Text.Trim()));
            }
            byId2.SuccessBidDate = successBidDate;
            decimal?num = null;
            if (!string.IsNullOrEmpty(this.txtSuccessBidPrice.Text))
            {
                num = new decimal?(System.Convert.ToDecimal(this.txtSuccessBidPrice.Text.Trim()));
            }
            byId2.SuccessBidPrice   = num;
            byId2.SuccessBidRemark  = this.txtSuccessBidRemark.Text.Trim();
            byId.PrjCost            = new double?(System.Convert.ToDouble(num));
            byId.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now);
            byId.PrjState           = new int?(int.Parse(ProjectParameter.WinBid));
            byId.ParentTypeCode     = pTPrjInfoZTBService.GetParentTypeCode(this.dropParentProject.SelectedValue);
            pTPrjInfoZTBService.Update(byId);
            pTPrjInfoZTBDetailService.Update(byId2);
            base.RegisterScript("top.ui.alert('中标资料保存成功!');top.ui.closeWin();top.ui.reloadTab();");
        }
    }
Пример #3
0
 protected void btnSave_Click(object sender, System.EventArgs e)
 {
     try
     {
         string value = this.hfldPrjId.Value;
         if (!string.IsNullOrEmpty(value))
         {
             PTPrjInfoZTBService       pTPrjInfoZTBService       = new PTPrjInfoZTBService();
             PTPrjInfoZTBDetailService pTPrjInfoZTBDetailService = new PTPrjInfoZTBDetailService();
             PTPrjInfoZTB       byId  = pTPrjInfoZTBService.GetById(new System.Guid(value));
             PTPrjInfoZTBDetail byId2 = pTPrjInfoZTBDetailService.GetById(value);
             if (!string.IsNullOrEmpty(this.txtApplyDate.Text.Trim()))
             {
                 byId2.ProjApplyDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyDate.Text.Trim()));
             }
             if (!string.IsNullOrEmpty(this.txtProjStartDate.Text.Trim()))
             {
                 byId2.ProjStartDate = new System.DateTime?(System.Convert.ToDateTime(this.txtProjStartDate.Text.Trim()));
             }
             byId2.ProjStartRemark   = this.txtStartRemark.Text.Trim();
             byId.PrjState           = new int?(System.Convert.ToInt32(ProjectParameter.Initiate));
             byId.IsGiveUp           = false;
             byId.OldState           = null;
             byId.PrjStateChangeTime = new System.DateTime?(System.DateTime.Now);
             pTPrjInfoZTBService.Update(byId);
             pTPrjInfoZTBDetailService.Update(byId2);
             base.RegisterScript("top.ui.show('报名通过资料保存成功!');top.ui.winSuccess({parentName:'_initiatePass'});");
         }
     }
     catch
     {
         base.RegisterScript("top.ui.alert('报名通过资料保存失败!');top.ui.winSuccess({parentName:'_initiatePass'});");
     }
 }
Пример #4
0
        private PTPrjInfo GetPrjInfo(PTPrjInfoZTB prjInfoZTB, PTPrjInfoZTBDetail prjInfoZTBDetail)
        {
            bool flag = this.IsExist(prjInfoZTB.PrjGuid);
            PTPrjInfoZTBUserService service = new PTPrjInfoZTBUserService();
            string typeCode = string.Empty;
            int?   nullable = null;

            if (flag)
            {
                if (!string.IsNullOrEmpty(prjInfoZTB.ParentTypeCode))
                {
                    PTPrjInfo info = (from p in this
                                      where p.PrjGuid == prjInfoZTB.PrjGuid
                                      select p).FirstOrDefault <PTPrjInfo>();
                    typeCode = string.Equals(info.TypeCode.Substring(0, 5), prjInfoZTB.ParentTypeCode) ? info.TypeCode : this.GetTypeCode(prjInfoZTB.ParentTypeCode);
                    nullable = info.i_xh;
                }
                else
                {
                    typeCode = this.GetTypeCode(prjInfoZTB.ParentTypeCode);
                    nullable = new int?(this.GetI_xh());
                }
            }
            else
            {
                typeCode = this.GetTypeCode(prjInfoZTB.ParentTypeCode);
                nullable = new int?(this.GetI_xh());
            }
            PTPrjInfo info2 = new PTPrjInfo {
                TypeCode        = typeCode,
                i_xh            = nullable,
                IsValid         = "1",
                PrjCode         = prjInfoZTB.PrjCode,
                PrjState        = prjInfoZTB.PrjState,
                xmgroup         = "",
                UserCode        = prjInfoZTBDetail.InputUser,
                PrjGuid         = new Guid?(prjInfoZTB.PrjGuid),
                PrjName         = prjInfoZTB.PrjName,
                StartDate       = prjInfoZTB.StartDate,
                EndDate         = prjInfoZTB.EndDate,
                ComputeClass    = prjInfoZTB.ComputeClass,
                RationClass     = prjInfoZTB.RationClass,
                PrjCost         = prjInfoZTB.PrjCost,
                ContractSum     = prjInfoZTB.ContractSum,
                Duration        = prjInfoZTB.Duration,
                QualityClass    = prjInfoZTB.QualityClass,
                Area            = prjInfoZTB.Area,
                PrjKindClass    = prjInfoZTB.PrjKindClass,
                PrjPlace        = prjInfoZTB.PrjPlace,
                Remark1         = prjInfoZTB.Remark,
                Owner           = prjInfoZTB.Owner,
                Counsellor      = prjInfoZTB.Counsellor,
                Designer        = prjInfoZTB.Designer,
                Inspector       = prjInfoZTB.Inspector,
                PrjInfo         = prjInfoZTB.PrjInfo,
                OwnerCode       = prjInfoZTB.OwnerCode,
                MarketInfoGuid  = prjInfoZTB.MarketInfoGuid,
                Rank            = prjInfoZTB.Rank,
                BudgetWay       = prjInfoZTB.BudgetWay,
                ContractWay     = prjInfoZTB.ContractWay,
                PayCondition    = prjInfoZTB.PayCondition,
                TenderWay       = prjInfoZTB.TenderWay,
                PayWay          = prjInfoZTB.PayWay,
                KeyPart         = prjInfoZTB.KeyPart,
                WorkUnit        = prjInfoZTB.WorkUnit,
                LinkMan         = prjInfoZTB.LinkMan,
                PrjManager      = prjInfoZTB.PrjManager,
                BuildingType    = prjInfoZTB.BuildingType,
                TotalHouseNum   = prjInfoZTB.TotalHouseNum,
                BuildingArea    = prjInfoZTB.BuildingArea,
                UsegrounArea    = prjInfoZTB.UsegrounArea,
                UndergroundArea = prjInfoZTB.UndergroundArea,
                PrjFundInfo     = prjInfoZTB.PrjFundInfo,
                OtherStatement  = prjInfoZTB.OtherStatement,
                i_ChildNum      = 0
            };
            string str2 = service.GetUser(prjInfoZTB.PrjGuid.ToString()).ToCsv();

            info2.Podepom = "," + str2;
            return(info2);
        }