Example #1
0
    private void Initial()
    {
        BudContractConsReport byId = this.rptSer.GetById(this.rptId);

        this.lblDate.Text  = byId.InputDate.ToString("yyyy-MM-dd");
        this.txtNode.Value = byId.Note;
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.PrjId);

        if (byId2 != null)
        {
            this.lblPrjName.Text = byId2.PrjName;
        }
        System.Collections.Generic.List <BudContractConsTask> list = (
            from ct in this.ctSer
            where ct.RptId == this.rptId
            select ct).ToList <BudContractConsTask>();
        BudContractTaskService budContractTaskService = new BudContractTaskService();

        foreach (BudContractConsTask current in list)
        {
            if (current.ContractTask == null)
            {
                current.ContractTask = budContractTaskService.GetTaskById(current.TaskId);
            }
        }
        this.gvwConsTask.DataSource = list;
        this.gvwConsTask.DataBind();
    }
Example #2
0
    private string GetPrjName()
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(BudgetManage_Report_IndirectCostDetail.prjId);

        return(byId.PrjName);
    }
Example #3
0
    public string GetPrjOrOrg(object inDiaryIdObj)
    {
        string inDiaryId          = inDiaryIdObj.ToString();
        BudIndirectDiaryCost byId = this.cSer.GetById(inDiaryId);

        if (byId == null)
        {
            return(string.Empty);
        }
        string result = string.Empty;

        if (byId.CostType == "P")
        {
            PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
            PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.ProjectId);
            if (byId2 != null)
            {
                result = byId2.PrjName;
            }
        }
        else
        {
            PTdbmService pTdbmService = new PTdbmService();
            PTdbm        byId3        = pTdbmService.GetById(byId.ProjectId);
            if (byId3 != null)
            {
                result = byId3.V_bmqc;
            }
        }
        return(result);
    }
 private void BindPrjName()
 {
     if (this.year != "zzjg" && this.prjId != "")
     {
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
         this.prjName = byId.PrjName;
     }
 }
Example #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.hfldPrjId.Value = this.prjId;
         PTPrjInfo byId = this.prjSer.GetById(this.prjId);
         this.lblProject.Text = byId.PrjName;
         this.BindGv();
     }
 }
Example #6
0
    public void InitPage()
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);

        if (byId != null)
        {
            base.RegisterScript("setIframe('" + byId.PrjName + "')");
        }
    }
Example #7
0
        public void UpdatePrjStateAtStateChange(string prjId, int prjOldState, int prjState)
        {
            Guid         id   = new Guid(prjId);
            PTPrjInfoZTB byId = this.GetById(id);

            if (byId != null)
            {
                byId.PrjStateChangeTime = new DateTime?(DateTime.Now);
                base.Update(byId);
                PTPrjInfoZTBDetailService service = new PTPrjInfoZTBDetailService();
                if (prjOldState == 1)
                {
                    service.ChangeFlowSateByPrjId(prjId, 1);
                }
                PTPrjInfoService service2 = new PTPrjInfoService();
                PTPrjInfo        item     = service2.GetById(prjId);
                if (item != null)
                {
                    item.PrjState = new int?(prjState);
                    service2.Update(item);
                }
                if (prjState == 1)
                {
                    this.ChangeStateAndPrjState(byId, prjState, -1, -1, -1, -1);
                    service.ChangeFlowSateByPrjId(prjId, -1);
                }
                else if (prjState == 2)
                {
                    this.ChangeStateAndPrjState(byId, prjState, -1, -1, -1, -1);
                }
                else if (((prjState == 3) || (prjState == 0x13)) || (prjState == 14))
                {
                    this.ChangeStateAndPrjState(byId, prjState, 1, -1, -1, -1);
                }
                else if (((prjState == 15) || (prjState == 0x10)) || (prjState == 4))
                {
                    this.ChangeStateAndPrjState(byId, prjState, 1, 1, -1, -1);
                }
                else if (prjState == 6)
                {
                    this.ChangeStateAndPrjState(byId, prjState, 1, 1, 1, -1);
                }
                else if (prjState == 5)
                {
                    this.ChangeStateAndPrjState(byId, prjState, 1, 1, 1, -1);
                    service2.ChangePrjInfo(byId, prjState, 1);
                }
                else if (prjState == 0x12)
                {
                    this.ChangeStateAndPrjState(byId, prjState, 1, -1, -1, 1);
                }
            }
        }
Example #8
0
    protected string GetPrjName(string prjId)
    {
        string           result           = string.Empty;
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(prjId);

        if (byId != null)
        {
            result = byId.PrjName;
        }
        return(result);
    }
Example #9
0
    private void Initial()
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);

        if (byId != null)
        {
            this.lblPrjName.Text = byId.PrjName;
        }
        if (this.type == "add")
        {
            this.RptId        = System.Guid.NewGuid().ToString();
            this.txtDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            BudContractConsReport budContractConsReport = new BudContractConsReport();
            budContractConsReport.RptId     = this.RptId;
            budContractConsReport.IsValid   = false;
            budContractConsReport.PrjId     = this.prjId;
            budContractConsReport.InputUser = PageHelper.QueryUser(this, base.UserCode);
            this.rptSer.Add(budContractConsReport);
            return;
        }
        if (this.type == "edit")
        {
            BudContractConsReport byId2 = this.rptSer.GetById(this.RptId);
            if (byId2 != null)
            {
                this.txtDate.Text  = byId2.InputDate.ToString("yyyy-MM-dd");
                this.txtNode.Value = byId2.Note;
            }
            else
            {
                this.txtDate.Text  = string.Empty;
                this.txtNode.Value = string.Empty;
            }
            System.Collections.Generic.List <BudContractConsTask> list = (
                from ct in this.ctSer
                where ct.RptId == this.RptId
                select ct).ToList <BudContractConsTask>();
            BudContractTaskService source = new BudContractTaskService();
            foreach (BudContractConsTask consTask in list)
            {
                if (consTask.ContractTask == null)
                {
                    consTask.ContractTask = (
                        from r in source
                        where r.TaskId == consTask.TaskId
                        select r).FirstOrDefault <BudContractTask>();
                }
            }
            this.SaveToViewState(list);
            this.BindConsTask(list);
        }
    }
Example #10
0
    protected string GetPrjName()
    {
        string           result           = string.Empty;
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(base.Request["PrjCode"]);

        if (byId != null)
        {
            result = byId.PrjName;
        }
        return(result);
    }
Example #11
0
    private void SowBtnGenerage()
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(this.hfldPrjId.Value);

        if (byId.TypeCode.Length == 10 && (this.hfldFlowstate.Value == "-1" || this.hfldFlowstate.Value == "-3") && ConfigHelper.Get("ProjectStandalone") == "0")
        {
            this.btnGenerage.Visible = true;
            return;
        }
        this.btnGenerage.Visible = false;
    }
Example #12
0
 protected void Page_Load(object sender, System.EventArgs e)
 {
     if (!base.IsPostBack)
     {
         this.btnDel.Attributes.Add("onclick", "if(!delCheck()){return false;}");
         this.btnUpdate.Attributes.Add("onclick", "if(!checkCount()){return false;}");
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
         this.lblProjectName.Text = byId.PrjName;
         this.hdnProname.Value    = byId.PrjName;
         this.setDataSource(this.prjId);
     }
 }
Example #13
0
        public void UpdatePrjState(PTPrjInfoZTB prjInfoZTB, int?state)
        {
            PTPrjInfoService service = new PTPrjInfoService();
            bool             flag    = service.IsExist(prjInfoZTB.PrjGuid);

            prjInfoZTB.PrjState           = state;
            prjInfoZTB.PrjStateChangeTime = new DateTime?(DateTime.Now);
            base.Update(prjInfoZTB);
            if (flag)
            {
                PTPrjInfo byId = service.GetById(prjInfoZTB.PrjGuid.ToString());
                byId.PrjState = state;
                service.Update(byId);
            }
        }
Example #14
0
    private void BindInfo()
    {
        EquEquipment equInfo = this.equipmentSer.GetById(this.equId);

        this.txtEquName.Text = equInfo.EquName;
        this.txtEquCode.Text = equInfo.EquCode;
        BasicCodeList basicCodeList = this.basicCodeSer.GetByType("EquProperty").FirstOrDefault((BasicCodeList pro) => pro.ItemCode == equInfo.EquProperty);

        if (basicCodeList != null)
        {
            this.txtEquProperty.Text = basicCodeList.ItemName;
        }
        if (!this.isAdd)
        {
            EquShipDayReport byId = this.dayService.GetById(this.dayId);
            if (byId != null)
            {
                PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
                PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.PrjId);
                if (byId2 != null)
                {
                    this.txtPrjName.Text = byId2.PrjName;
                    this.hfldPrjId.Value = byId.PrjId;
                }
                this.txtReportDate.Text            = Common2.GetTime(byId.ReportDate);
                this.txtConstructionDate.Text      = Common2.GetTime(byId.ConstructionDate);
                this.txtWorkDurationT1.Text        = (byId.WorkDurationT1.HasValue ? byId.WorkDurationT1.Value.ToString("0.000") : "0.000");
                this.txtDayOilWear.Text            = (byId.DayOilWear.HasValue ? byId.DayOilWear.Value.ToString("0.000") : "0.000");
                this.txtNotWorkRestDurationT3.Text = (byId.NotWorkRestDurationT3.HasValue ? byId.NotWorkRestDurationT3.Value.ToString("0.000") : "0.000");
                this.txtWorkRestDurationT2.Text    = (byId.WorkRestDurationT2.HasValue ? byId.WorkRestDurationT2.Value.ToString("0.000") : "0.000");
                this.txtNote.Text = byId.Note;
                this.setOutputValueType(byId);
            }
        }
        else
        {
            this.dayId = System.Guid.NewGuid().ToString();
            this.txtConstructionDate.Text = System.DateTime.Now.ToString("yyyy-MM-dd");
            this.txtReportDate.Text       = System.DateTime.Now.ToString("yyyy-MM-dd");
        }
        this.hfldDayId.Value = this.dayId;
        this.flAnnx.MID      = 1901;
        this.flAnnx.FID      = this.hfldDayId.Value;
        this.flAnnx.Type     = 1;
    }
Example #15
0
 protected override void OnInit(System.EventArgs e)
 {
     if (!string.IsNullOrEmpty(base.Request["prjId"]))
     {
         this.prjId = base.Request["prjId"];
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
         if (byId != null)
         {
             this.prjName = byId.PrjName;
         }
     }
     if (!string.IsNullOrEmpty(base.Request["year"]))
     {
         this.year = base.Request["year"];
     }
     base.OnInit(e);
 }
Example #16
0
 private void BindPrjName()
 {
     if (this.year != "zzjg")
     {
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
         if (byId != null)
         {
             this.hfldPrjName.Value = byId.PrjName;
             return;
         }
         PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService();
         PTPrjInfoZTB        byId2 = pTPrjInfoZTBService.GetById(this.prjId);
         if (byId2 != null)
         {
             this.hfldPrjName.Value = byId2.PrjName;
         }
     }
 }
Example #17
0
        public void ModifyPrjInfoChildNum(PTPrjInfoZTB prjZTB)
        {
            PTPrjInfoService service = new PTPrjInfoService();

            new PTPrjInfo();
            if (!string.IsNullOrEmpty(prjZTB.ParentTypeCode))
            {
                PTPrjInfo item = (from p in service
                                  where p.TypeCode.StartsWith(prjZTB.ParentTypeCode) && (p.TypeCode.Length == 5)
                                  select p).FirstOrDefault <PTPrjInfo>();
                if (item != null)
                {
                    int?nullable2;
                    int?nullable = item.i_ChildNum;
                    item.i_ChildNum = nullable.HasValue ? ((nullable2 = nullable).HasValue ? new int?(nullable2.GetValueOrDefault() - 1) : null) : 0;
                }
                service.Update(item);
            }
        }
Example #18
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (this.ViewState[TechnologyJDQuery.resourceTable] != null)
         {
             this.ViewState[TechnologyJDQuery.resourceTable] = null;
         }
         if (base.Request["prjId"] != null)
         {
             this.HdnPrjCode.Value = base.Request["prjId"].ToString();
             PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
             PTPrjInfo        byId             = pTPrjInfoService.GetById(this.HdnPrjCode.Value);
             if (byId != null)
             {
                 this.HdnPrjName.Value = byId.PrjName;
             }
             this.ViewState["PRJCODE"] = this.HdnPrjCode.Value;
             this.ViewState["PRJNAME"] = this.HdnPrjName.Value;
             this.TechnologyBind(this.HdnPrjCode.Value);
             if (this._Levels.Trim() == "1")
             {
                 this.BtnAdd.Visible = false;
                 this.BtnUpd.Visible = false;
                 this.BtnDel.Visible = false;
             }
         }
         else
         {
             this.BtnAdd.Visible  = false;
             this.BtnUpd.Visible  = false;
             this.BtnDel.Visible  = false;
             this.BtnView.Visible = false;
         }
         this.BtnAdd.Attributes["onclick"]  = "openEdit('Add')";
         this.BtnUpd.Attributes["onclick"]  = "openEdit('Upd')";
         this.BtnView.Attributes["onclick"] = "openEdit('View')";
         this.BtnDel.Attributes["onclick"]  = "javascript:if(!confirm('确定要删除当前选中数据吗?')){return false;}";
         return;
     }
     this._PrjCode = this.ViewState["PRJCODE"].ToString();
 }
Example #19
0
    public void setTitle()
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);

        this.hfPrjName.Value = byId.PrjName;
        if (this.plantype == "payout")
        {
            this.hfldAdjunctPath.Value = ConfigHelper.Get("MonthPlanPayOut");
            this.lblTitle.Text         = this.hfPrjName.Value + "  支出计划";
            this.WF1.BusiCode          = "091";
            return;
        }
        if (this.plantype == "income")
        {
            this.hfldAdjunctPath.Value = ConfigHelper.Get("MonthPlanIncome");
            this.lblTitle.Text         = this.hfPrjName.Value + "  收入计划";
            this.WF1.BusiCode          = "090";
        }
    }
Example #20
0
        public static IList <SelectProject> GetProject(string userCode, IList <string> stateList, string code, string name)
        {
            IList <string>       busiDataId = PrivHelper.GetBusiDataId("project", userCode);
            PTPrjInfoService     service    = new PTPrjInfoService();
            List <SelectProject> first      = new List <SelectProject>();
            int num = (busiDataId.Count / 0x5dc) + 1;

            for (int i = 0; i < num; i++)
            {
                List <string>        theIdList = busiDataId.Skip <string>((i * 0x5dc)).Take <string>(0x5dc).ToList <string>();
                List <SelectProject> second    = (from p in service
                                                  where (((stateList.Contains(p.PrjState.ToString()) && theIdList.Contains(p.PrjGuid.ToString())) && (p.IsValid == "1")) && p.PrjCode.Contains(code)) && p.PrjName.Contains(name)
                                                  select new SelectProject {
                    Id = p.PrjGuid.Value.ToString(), Code = p.PrjCode, Name = p.PrjName, TypeCode = p.TypeCode, OwnerCode = p.OwnerCode.ToString(), Place = p.PrjPlace, State = p.PrjState.Value, Order = p.StartDate.Value.ToString("yyyyMMdd"), IsParent = true
                }).ToList <SelectProject>();
                first = first.Union <SelectProject>(second).ToList <SelectProject>();
            }
            for (int j = 0; j < first.Count; j++)
            {
                SelectProject project = first[j];
                if (project.TypeCode.Length == 10)
                {
                    PTPrjInfo parent = service.GetParent(project.Id);
                    if (parent != null)
                    {
                        project.Order = parent.StartDate.Value.ToString("yyyyMMdd") + project.Order;
                    }
                    if (ExistParent(project.TypeCode, first))
                    {
                        project.IsParent = false;
                    }
                }
                else
                {
                    project.Order = project.Order + "99999999";
                }
            }
            return((from p in first
                    orderby p.Order descending
                    select p).ToList <SelectProject>());
        }
Example #21
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request.QueryString["Type"] != null)
         {
             this.HdnType.Value = base.Request.QueryString["Type"].ToString();
         }
         if (base.Request.QueryString["Levels"] != null)
         {
             this.HdnLevels.Value = base.Request.QueryString["Levels"].ToString();
         }
         if (base.Request["prjId"] != null)
         {
             this.HdnPrjCode.Value = base.Request.QueryString["prjId"].ToString();
             PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
             PTPrjInfo        byId             = pTPrjInfoService.GetById(this.HdnPrjCode.Value);
             if (byId != null)
             {
                 this.HdnPrjName.Value = byId.PrjName;
             }
             this.ViewState["PRJCODE"] = this.HdnPrjCode.Value;
             if (this.HdnType.Value == "Edit" || this.HdnType.Value == "Auditing")
             {
                 this.PPMExpertBind();
             }
             else
             {
                 this.EntExpertBind();
             }
         }
         else
         {
             this.BtnAdd.Visible = false;
         }
         this.BtnView.Attributes["onclick"] = "openview('',1)";
         this.BtnAdd.Attributes["onclick"]  = "openEdit('Add')";
         this.BtnUpd.Attributes["onclick"]  = "openEdit('Upd')";
         this.BtnDel.Attributes["onclick"]  = "deleteConstruct()";
     }
 }
Example #22
0
    private string GetPrjCode(string prjId)
    {
        string           result           = string.Empty;
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(prjId);

        if (byId != null)
        {
            result = byId.PrjCode;
        }
        else
        {
            PTPrjInfoZTBService pTPrjInfoZTBService = new PTPrjInfoZTBService();
            PTPrjInfoZTB        byId2 = pTPrjInfoZTBService.GetById(prjId);
            if (byId2 != null)
            {
                result = byId2.PrjCode;
            }
        }
        return(result);
    }
Example #23
0
    private void GenerageBudgetByParent(string prjId)
    {
        PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
        PTPrjInfo        byId             = pTPrjInfoService.GetById(prjId);
        PTPrjInfo        parent           = pTPrjInfoService.GetParent(prjId);
        string           str            = byId.TypeCode.Substring(6, 4);
        BudTaskService   budTaskService = new BudTaskService();

        budTaskService.DeleteByProject(prjId);
        System.Collections.Generic.IList <cn.justwin.Domain.Entities.BudTask> byProject = budTaskService.GetByProject(parent.PrjGuid.Value.ToString(), 999);
        for (int i = 0; i < byProject.Count; i++)
        {
            cn.justwin.Domain.Entities.BudTask budTask = byProject[i];
            budTask.PrjId  = byId.PrjGuid.Value.ToString();
            budTask.TaskId = budTask.TaskId.Substring(0, 9) + str + budTask.TaskId.Substring(13);
            if (!string.IsNullOrEmpty(budTask.ParentId))
            {
                budTask.ParentId = budTask.ParentId.Substring(0, 9) + str + budTask.ParentId.Substring(13);
            }
            budTaskService.Add(budTask);
        }
        this.BindGv();
    }
Example #24
0
    private void InitDiary()
    {
        BudIndirectDiaryCost byId = this.diarySer.GetById(this.diaryId);

        this.lblName.Text       = byId.Name;
        this.lblInputDate.Text  = byId.InputDate.ToString("yyyy-MM-dd");
        this.lblDepartment.Text = byId.Department;
        this.lblInputUser.Text  = byId.InputUser;
        this.lblIssueBy.Text    = byId.IssuedBy;
        this.lblCode.Text       = byId.IndireCode;
        if (byId.CostType == "P")
        {
            PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
            PTPrjInfo        byId2            = pTPrjInfoService.GetById(byId.ProjectId);
            if (byId2 != null)
            {
                this.lblPrjName.Text = byId2.PrjName;
            }
        }
        else
        {
            this.ltlCostTypeName.Text = "组织机构";
            PTdbmService pTdbmService = new PTdbmService();
            PTdbm        byId3        = pTdbmService.GetById(byId.ProjectId);
            if (byId3 != null)
            {
                this.lblPrjName.Text = byId3.V_bmqc;
            }
        }
        PCPettyCashService pCPettyCashService = new PCPettyCashService();
        PCPettyCash        byId4 = pCPettyCashService.GetById(byId.PettyCashId);

        if (byId4 != null)
        {
            this.lblPettyCash.Text = byId4.Matter;
        }
    }
Example #25
0
 public void BindGv()
 {
     cn.justwin.Domain.BudTaskChange taskChange = cn.justwin.Domain.BudTaskChange.GetTaskChange(this.prjId);
     if (taskChange != null)
     {
         DataTable taskInfo = cn.justwin.Domain.BudTask.GetTaskInfo(this.prjId, this.hfldIsWBSRelevance.Value, string.Empty, string.Empty, string.Empty);
         this.gvBudget.DataSource = taskInfo;
         this.gvBudget.DataBind();
         if (!string.IsNullOrEmpty(this.prjId))
         {
             PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
             PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
             if (byId != null)
             {
                 this.lblPrjName.Text = byId.PrjName;
             }
         }
         int  wBSFlowState = Project.GetWBSFlowState(this.prjId);
         bool flag         = cn.justwin.Domain.BudTaskChange.IsAllowBudget(this.prjId);
         this.hfldIsLocked.Value = (!flag).ToString();
         Label expr_BC = this.lblPrjName;
         expr_BC.Text = expr_BC.Text + "(" + Common2.GetStateNoColor(wBSFlowState.ToString()) + ")";
     }
 }
Example #26
0
 protected void Initial()
 {
     if (!string.IsNullOrEmpty(base.Request["ContractID"]))
     {
         string text = base.Request["ContractID"];
         this.hfldContractId.Value = text;
         ConIncometContract byContractId = this.conIncometSev.GetByContractId(text);
         this.hfldPrjGuid.Value    = byContractId.Project;
         this.lblContractName.Text = byContractId.ContractName;
     }
     if (!string.IsNullOrEmpty(base.Request["id"]))
     {
         string rptId = base.Request["id"];
         if (rptId != string.Empty)
         {
             this.hfldType.Value = "edit";
         }
         else
         {
             this.hfldType.Value = "add";
         }
         this.hfldRptId.Value = rptId;
         BudContractConsReport byId = this.rptSer.GetById(this.hfldRptId.Value);
         this.txtDate.Text  = byId.InputDate.ToString("yyyy-MM-dd");
         this.txtNode.Value = byId.Note;
         System.Collections.Generic.List <BudContractConsTask> list = (
             from ct in this.ctSer
             where ct.RptId == rptId
             select ct).ToList <BudContractConsTask>();
         BudContractTaskService budContractTaskService = new BudContractTaskService();
         DataTable dataTable = new DataTable();
         foreach (BudContractConsTask current in list)
         {
             if (current.ContractTask == null)
             {
                 current.ContractTask = budContractTaskService.GetTaskById(current.TaskId);
                 dataTable            = cn.justwin.Domain.BudContractTask.GetSingleBudContractTask(this.hfldPrjGuid.Value, current.TaskId);
                 if (dataTable.Rows.Count > 0)
                 {
                     current.ContractTask.Quantity = System.Convert.ToDecimal(dataTable.Rows[0]["Quantity"]);
                     current.ContractTask.Total    = new decimal?(System.Convert.ToDecimal(dataTable.Rows[0]["total"]));
                 }
             }
         }
         this.SaveToViewState(list);
         this.BindConsTask(list);
     }
     else
     {
         this.hfldRptId.Value = System.Guid.NewGuid().ToString();
     }
     if (!string.IsNullOrEmpty(this.hfldPrjGuid.Value))
     {
         PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
         PTPrjInfo        byId2            = pTPrjInfoService.GetById(this.hfldPrjGuid.Value);
         if (byId2 != null)
         {
             this.lblPrjName.Text = byId2.PrjName;
             this.txtDate.Text    = System.DateTime.Now.ToString("yyyy-MM-dd");
         }
     }
 }
Example #27
0
    protected void Page_Load(object sender, EventArgs e)
    {
        base.Response.Cache.SetNoStore();
        if (!string.IsNullOrEmpty(base.Request["pc"]))
        {
            this.prjId = base.Request["pc"];
            PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
            PTPrjInfo        byId             = pTPrjInfoService.GetById(this.prjId);
            this.prjCode = byId.PrjCode;
        }
        if (!string.IsNullOrEmpty(base.Request["opType"]))
        {
            this.opType = base.Request["opType"].Trim();
        }
        if (base.Request["codetype"] != "")
        {
            this.DictTypeID = base.Request["codetype"];
        }
        else
        {
            base.Response.End();
        }
        if (!this.Page.IsPostBack)
        {
            this.TvDict.Nodes.Clear();
            this.TvDict.Target = "FraCodeList2";
            TreeNode treeNode = new TreeNode();
            treeNode.Text        = "选择类型";
            treeNode.Value       = "0";
            treeNode.NavigateUrl = "~/EPC/UserControl1/webNullTS.aspx";
            string dictTypeID;
            if ((dictTypeID = this.DictTypeID) != null)
            {
                if (dictTypeID == "Img")
                {
                    treeNode.Text        = "图纸类型";
                    treeNode.NavigateUrl = string.Concat(new string[]
                    {
                        "/OPM/Business_Data/Business_Data_Manage.aspx?w=0&codeid=0&codetype=",
                        base.Request["codetype"].ToString(),
                        "&pc=",
                        base.Request["pc"].ToString(),
                        "&isshowall=false&opType=",
                        this.opType,
                        "&PrjCode=",
                        this.prjCode
                    });
                    goto IL_271;
                }
                if (dictTypeID == "211")
                {
                    treeNode.NavigateUrl = string.Concat(new string[]
                    {
                        "/OPM/FireManage/FireManageList.aspx?w=0&codeid=0&codetype=",
                        base.Request["codetype"].ToString(),
                        "&pc=",
                        base.Request["pc"].ToString(),
                        "&opType=",
                        this.opType,
                        "&PrjCode=",
                        this.prjCode
                    });
                    goto IL_271;
                }
            }
            treeNode.NavigateUrl = "~/EPC/UserControl1/webNullTS.aspx";
IL_271:
            if (this.DictTypeID == "Img")
            {
                if (this.opType == "img")
                {
                    treeNode.Text        = "图纸类型";
                    treeNode.NavigateUrl = string.Concat(new string[]
                    {
                        "/OPM/Business_Data/Business_Data_Main.aspx?w=0&codeid=0&codetype=",
                        base.Request["codetype"].ToString(),
                        "&pc=",
                        base.Request["pc"].ToString(),
                        "&isshowall=false&opType=",
                        this.opType,
                        "&PrjCode=",
                        this.prjCode
                    });
                }
                if (this.opType == "view")
                {
                    treeNode.Text        = "图纸类型";
                    treeNode.NavigateUrl = string.Concat(new string[]
                    {
                        "/OPM/Business_Data/Business_Data_Main.aspx?w=0&codeid=0&codetype=",
                        base.Request["codetype"].ToString(),
                        "&pc=",
                        base.Request["pc"].ToString(),
                        "&isshowall=false&opType=",
                        this.opType,
                        "&PrjCode=",
                        this.prjCode
                    });
                }
            }
            treeNode.Target   = "FraCodeList3";
            treeNode.Selected = true;
            this.TvDict.Nodes.Add(treeNode);
            DataTable dataTable = CodingAction.CodeInfoListType(this.DictTypeID);
            DataTable dt        = CodingAction.CodeInfoList(dataTable.Rows[0]["TypeID"].ToString());
            this.CreateDictTree(0, dt, treeNode);
        }
    }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!base.IsPostBack)
     {
         if (base.Request["prjId"] != null)
         {
             this.HdnPrjCode.Value = base.Request.QueryString["prjId"].ToString();
             PTPrjInfoService pTPrjInfoService = new PTPrjInfoService();
             PTPrjInfo        byId             = pTPrjInfoService.GetById(this.HdnPrjCode.Value);
             if (byId != null)
             {
                 this.HdnPrjName.Value = byId.PrjName;
             }
             this.ViewState["PRJCODE"] = this.HdnPrjCode.Value;
             this.ViewState["PRJNAME"] = this.HdnPrjName.Value;
             this.ViewState["LEVELS"]  = base.Request.QueryString["Levels"].ToString().Trim();
             this._Levels = this.ViewState["LEVELS"].ToString();
             if (this._Levels.Trim() != "")
             {
                 this.BtnAdd.Attributes.Add("style", "display:none");
                 this.BtnSelect.Attributes.Add("style", "display:none");
                 this.BtnUpd.Attributes.Add("style", "display:none");
                 this.BtnDel.Attributes.Add("style", "display:none");
                 this.btnSave.Attributes.Add("style", "display:none");
                 this.btnFiles.Attributes.Add("style", "display:none");
             }
             else
             {
                 this.BtnUpd.Enabled = false;
                 this.BtnDel.Enabled = false;
                 if (base.Request.QueryString["Type"] == "Auditing")
                 {
                     this.btnFiles.Attributes.Add("style", "display:none");
                     this.BtnSelect.Attributes.Add("style", "display:none");
                     this.BtnDel.Attributes.Add("style", "display:none");
                     this.BtnUpd.Attributes.Add("style", "display:none");
                     this.BtnAdd.Attributes.Add("style", "display:none");
                     this.DGrdStandard.Columns[this.DGrdStandard.Columns.Count - 1].Visible = true;
                 }
                 else
                 {
                     this.btnSave.Attributes.Add("style", "display:none");
                 }
             }
             this.StandardBind();
             this.BtnSelect.Attributes["onclick"] = "StandardSelect()";
             this.BtnAdd.Attributes["onclick"]    = "openEdit('Add')";
             this.BtnUpd.Attributes["onclick"]    = "openEdit('Upd')";
             this.BtnView.Attributes["onclick"]   = "openEdit('View')";
             this.BtnDel.Attributes["onclick"]    = "javascript:if(!confirm('确定要删除当前选中数据吗?')){return false;}";
             return;
         }
         this.BtnAdd.Visible    = false;
         this.BtnSelect.Visible = false;
         this.BtnAdd.Visible    = false;
         this.BtnUpd.Visible    = false;
         this.BtnDel.Visible    = false;
         this.BtnView.Visible   = false;
         this.btnSave.Visible   = false;
         this.btnFiles.Visible  = false;
     }
 }
 protected void btnSaveData_Click(object sender, System.EventArgs e)
 {
     try
     {
         string          prjGuid       = this.hfldPrjId.Value;
         TenderInfo      byId          = TenderInfo.GetById(prjGuid);
         System.DateTime?projApplyDate = null;
         if (!string.IsNullOrEmpty(this.txtApplyDate.Text))
         {
             projApplyDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApplyDate.Text));
         }
         byId.ProjApplyDate = projApplyDate;
         System.DateTime?projApprovalDate = null;
         if (!string.IsNullOrEmpty(this.txtApprovalDate.Text))
         {
             projApprovalDate = new System.DateTime?(System.Convert.ToDateTime(this.txtApprovalDate.Text));
         }
         byId.ProjApprovalDate = projApprovalDate;
         System.DateTime?projTenderDate = null;
         if (!string.IsNullOrEmpty(this.txtTenderDate.Text))
         {
             projTenderDate = new System.DateTime?(System.Convert.ToDateTime(this.txtTenderDate.Text));
         }
         byId.ProjTenderDate = projTenderDate;
         if (!string.IsNullOrEmpty(this.txtRegistDeadline.Text))
         {
             byId.ProjRegistDeadline = new int?(int.Parse(this.txtRegistDeadline.Text));
         }
         byId.ProgAgent = this.hfldAgent.Value;
         byId.PrequalificationRequire = this.txtPrequalificationRequire.Text;
         if (!string.IsNullOrWhiteSpace(this.txtQualificationMargin.Text))
         {
             byId.QualificationMargin = System.Convert.ToDecimal(this.txtQualificationMargin.Text);
         }
         byId.QualificationReadOne = this.hfldQualificationReadOne.Value;
         byId.UpdatePart(byId, ProjectParameter.Prequalification);
         System.Guid prjId = new System.Guid(prjGuid);
         bool        flag  = this.prjInfoSer.IsExist(prjId);
         if (flag)
         {
             PTPrjInfo byId2 = this.prjInfoSer.GetById(prjGuid);
             byId2.PrjState = new int?(System.Convert.ToInt32(ProjectParameter.Prequalification));
             this.prjInfoSer.Update(byId2);
         }
         if (!string.IsNullOrEmpty(byId.QualificationReadOne))
         {
             PTDBSJService pTDBSJService = new PTDBSJService();
             pTDBSJService.Add(new PTDBSJ
             {
                 I_XGID     = byId.PrjGuid.ToString(),
                 V_LXBM     = "024",
                 V_YHDM     = byId.QualificationReadOne,
                 DTM_DBSJ   = new System.DateTime?(System.DateTime.Now),
                 C_OpenFlag = "0",
                 V_Content  = "项目:" + byId.PrjName + "已经开始资格预审",
                 V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + byId.PrjGuid.ToString(),
                 V_TPLJ     = "new_Mail.gif"
             });
         }
         if (!string.IsNullOrEmpty(this.txtApplyDate.Text.Trim()))
         {
             PTDBSJTodayService pTDBSJTodayService = new PTDBSJTodayService();
             System.Collections.Generic.List <PTDBSJToday> list = (
                 from dbsj in pTDBSJTodayService
                 where dbsj.I_XGID == prjGuid
                 select dbsj).ToList <PTDBSJToday>();
             foreach (PTDBSJToday current in list)
             {
                 pTDBSJTodayService.Delete(current);
             }
             System.Collections.Generic.List <TenderUser> byId3 = TenderUser.GetById(byId.PrjGuid.ToString());
             System.DateTime value = System.Convert.ToDateTime(this.txtApplyDate.Text.Trim()).AddDays((double)(-(double)System.Convert.ToInt32(this.SignUpWarnDay)));
             foreach (TenderUser current2 in byId3)
             {
                 pTDBSJTodayService.Add(new PTDBSJToday
                 {
                     I_XGID     = prjGuid,
                     V_LXBM     = "027",
                     V_YHDM     = current2.UserCode,
                     DTM_DBSJ   = new System.DateTime?(value),
                     V_TPLJ     = "",
                     V_DBLJ     = "TenderManage/InfoView.aspx?ic=" + prjGuid,
                     V_Content  = "名称为:" + byId.PrjName + "的项目已经开始报名。",
                     C_OpenFlag = "1"
                 });
             }
         }
         this.bindGv();
         base.RegisterShow("系统提示", "保存成功");
     }
     catch (System.Exception)
     {
         base.RegisterShow("系统提示", "保存失败");
     }
 }