示例#1
0
    private void bind(string pk)
    {
        ItemProgInfo itemProgInfo = ItemProgAction.GetItemProgInfo(pk);
        DateTime     now          = DateTime.Now;

        this.DateBox_sprq.Text = string.Format("{0:yyyy-MM-dd}", now);
        this.TextBox_spyj.Text = itemProgInfo.ApproveIdea;
        this.TextBox_spr.Text  = itemProgInfo.ApprovePerson;
        if (itemProgInfo.ApproveResult == 1)
        {
            this.RadioButton_ok.Checked = true;
            return;
        }
        if (itemProgInfo.ApproveResult == 0)
        {
            this.RadioButton_no.Checked = true;
        }
    }
示例#2
0
    private void bind(string pk)
    {
        ItemProgInfo itemProgInfo = ItemProgAction.GetItemProgInfo(pk);

        this.TextBox_bcfdx.Text            = itemProgInfo.ByProgObject;
        this.Textbox_bz.Text               = itemProgInfo.Remark;
        this.TextBox_cfdw.Text             = itemProgInfo.ProgUnit;
        this.Textbox_cfje.Text             = itemProgInfo.ProgMoney.ToString();
        this.Textbox_cfrq.Text             = itemProgInfo.ProgDate.ToShortDateString().Replace("/", "-");
        this.TextBox_cfyj.Text             = itemProgInfo.ProgGist;
        this.TextBox_cfyy.Text             = itemProgInfo.ProgCause;
        this.Textbox_fzr.Text              = itemProgInfo.Principal;
        this.Textbox_cfdkcdw.Text          = itemProgInfo.ProgBurstunit;
        this.DropDownList_lb.SelectedValue = itemProgInfo.ProgSortCode.ToString();
        string sqlString = string.Empty;

        sqlString = "SELECT mark,filesType FROM Prj_ItemProg WHERE ID=" + itemProgInfo.ID;
        DataTable dataTable = publicDbOpClass.DataTableQuary(sqlString);

        if (dataTable != null && dataTable.Rows.Count > 0 && dataTable.Rows[0]["mark"] != null)
        {
            if (dataTable.Rows[0]["mark"].ToString() != "2")
            {
                this.cbkmark.Checked = true;
                if (dataTable.Rows[0]["filesType"] != null)
                {
                    this.hidenClass.Value = dataTable.Rows[0]["filesType"].ToString();
                }
            }
            else
            {
                this.cbkmark.Checked = false;
            }
            this.hdnmark.Value = dataTable.Rows[0]["mark"].ToString();
        }
    }