Пример #1
0
    protected void gvDataInfo_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType != DataControlRowType.DataRow)
        {
            if (e.Row.RowType == DataControlRowType.Footer)
            {
                string  selectedValue      = this.dropPrjType.SelectedValue;
                decimal sumTotalAtChgState = TenderInfo.GetSumTotalAtChgState(this.txtPrjName.Text, this.txtPrjCode.Text, this.txtBuildUnit.Text, selectedValue, this.txtStartTime.Text, this.txtEndTime.Text, this.GetState(2), this.GetState(1), base.UserCode, string.Empty, 3, "ChangeFlowSate");
                e.Row.Cells[1].Text = "合计";
                e.Row.Cells[8].Text = sumTotalAtChgState.ToString("#0.000");
                e.Row.Cells[8].Style.Add("text-align", "right");
                e.Row.Cells[8].CssClass = "decimal_input";
            }
            return;
        }
        string text = this.gvDataInfo.DataKeys[e.Row.RowIndex]["PrjGuid"].ToString();

        e.Row.Attributes["id"]           = text;
        e.Row.Attributes["guid"]         = text;
        e.Row.Attributes["PrjState"]     = this.gvDataInfo.DataKeys[e.Row.RowIndex]["PrjState"].ToString();
        e.Row.Attributes["prjInfoState"] = this.gvDataInfo.DataKeys[e.Row.RowIndex]["PrjInfoState"].ToString();
        e.Row.Attributes["flowState"]    = this.gvDataInfo.DataKeys[e.Row.RowIndex]["ChangeFlowSate"].ToString();
        PTPrjInfoStateChange byPrjIdByOrder = new PTPrjInfoStateChangeService().GetByPrjIdByOrder(text, -1);

        if (byPrjIdByOrder != null)
        {
            e.Row.Attributes["changed"] = "1";
            return;
        }
        e.Row.Attributes["changed"] = "0";
    }
Пример #2
0
    protected void gvTender_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType != DataControlRowType.DataRow)
        {
            if (e.Row.RowType == DataControlRowType.Footer)
            {
                e.Row.Cells[0].Text = "合计";
                DataTable tenderReport = TenderInfo.GetTenderReport(this.txtCode.Text.Trim(), this.txtName.Text.Trim(), this.ddlType.SelectedValue.Trim(), this.txtManager.Value.Trim(), this.txtPrjFollowPeople.Value.Trim(), this.txtPrjPeople.Value.Trim(), this.ddlPrjState.SelectedValue.Trim(), this.txtStartTime.Text.Trim(), this.txtEndTime.Text, this.txtOwnerName.Text.Trim(), this.txtProjPeopleDep.Text, this.dropPrjProperty.SelectedValue, this.txtPrincipal.Value.Trim(), 1, this.AspNetPager1.PageSize * this.AspNetPager1.RecordCount, base.UserCode, this.txtPrjStateChangeTimeStart.Text.Trim(), this.txtPrjStateChangeTimeEnd.Text.Trim());
                e.Row.Cells[8].Text = tenderReport.Compute("SUM(PrjCost)", string.Empty).ToString();
                e.Row.Cells[8].Style.Add("text-align", "right");
                e.Row.Cells[8].CssClass = "decimal_input";
                e.Row.Cells[9].Text     = tenderReport.Compute("SUM(ProfessionalCost)", string.Empty).ToString();
                e.Row.Cells[9].Style.Add("text-align", "right");
                e.Row.Cells[9].CssClass = "decimal_input";
                e.Row.Cells[10].Text    = tenderReport.Compute("SUM(SuccessBidPrice)", string.Empty).ToString();
                e.Row.Cells[10].Style.Add("text-align", "right");
                e.Row.Cells[10].CssClass = "decimal_input";
            }
            return;
        }
        string text = this.gvTender.DataKeys[e.Row.RowIndex]["PrjGuid"].ToString();

        e.Row.Attributes["id"] = text;
        PTPrjInfoStateChange byPrjIdByOrder = new PTPrjInfoStateChangeService().GetByPrjIdByOrder(text);

        if (byPrjIdByOrder != null)
        {
            e.Row.Attributes["changed"] = "1";
            return;
        }
        e.Row.Attributes["changed"] = "0";
    }
Пример #3
0
    private void bindGv()
    {
        PTPrjInfoStateChangeService pTPrjInfoStateChangeService = new PTPrjInfoStateChangeService();
        string prjGuid = base.Request["prjId"].ToString();

        this.AspNetPager1.RecordCount = pTPrjInfoStateChangeService.GetCountByPrjGuidAndCondition(prjGuid, this.txtStartTime.Text, this.txtEndTime.Text);
        this.gvDataInfo.DataSource    = pTPrjInfoStateChangeService.GetLstByPrjGuid(prjGuid, this.txtStartTime.Text, this.txtEndTime.Text, this.AspNetPager1.CurrentPageIndex, this.AspNetPager1.PageSize);
        this.gvDataInfo.DataBind();
    }
Пример #4
0
        public void CommitEvent(object key)
        {
            string prjId = key.ToString();
            PTPrjInfoStateChangeService service        = new PTPrjInfoStateChangeService();
            PTPrjInfoZTBService         service2       = new PTPrjInfoZTBService();
            PTPrjInfoStateChange        byPrjIdByOrder = service.GetByPrjIdByOrder(prjId, -1);

            if (byPrjIdByOrder != null)
            {
                service.ChangeFlowStateInfo(prjId, -1, 1);
                service2.UpdatePrjStateAtStateChange(prjId, byPrjIdByOrder.OldState.Value, byPrjIdByOrder.ChangeState.Value);
            }
        }
Пример #5
0
    private void BindData()
    {
        string text = base.Request["ic"].ToString();
        PTPrjInfoStateChange byPrjIdByOrder;

        if (string.IsNullOrEmpty(base.Request["pass"]))
        {
            byPrjIdByOrder = new PTPrjInfoStateChangeService().GetByPrjIdByOrder(text, 1);
        }
        else
        {
            byPrjIdByOrder = new PTPrjInfoStateChangeService().GetByPrjIdByOrder(text, -1);
        }
        BasicCodeListService basicCodeListService = new BasicCodeListService();

        System.Guid  id   = new System.Guid(text);
        PTPrjInfoZTB byId = new PTPrjInfoZTBService().GetById(id);

        if (byPrjIdByOrder != null)
        {
            if (!string.IsNullOrEmpty(byPrjIdByOrder.ChangeUser))
            {
                PTyhmc byId2 = new PTYhmcService().GetById(byPrjIdByOrder.ChangeUser);
                this.lblChangeMan.Text = byId2.v_xm;
            }
            this.lblChangeTime.Text      = Common2.GetTime(byPrjIdByOrder.ChangeTime.ToString());
            this.lblOldState.Text        = basicCodeListService.GetNameByTypeAndCode("ProjectState", byPrjIdByOrder.OldState.Value);
            this.lblChangeState.Text     = basicCodeListService.GetNameByTypeAndCode("ProjectState", byPrjIdByOrder.ChangeState.Value);
            this.lblprjChangeReason.Text = byPrjIdByOrder.ChangeReason;
            this.lblPrjRemark.Text       = byPrjIdByOrder.Note;
        }
        if (byId != null)
        {
            this.lblPrjCode.Text   = byId.PrjCode;
            this.lblPrjName.Text   = byId.PrjName;
            this.lblStartDate.Text = Common2.GetTime(byId.StartDate).ToString();
            this.lblEndDate.Text   = Common2.GetTime(byId.EndDate).ToString();
        }
    }