示例#1
0
    protected void OpenForm(int formID)
    {
        FormTableAdapter taForm = new FormTableAdapter();

        taForm.FillByID(this.InnerDS.Form, formID);
        FormDS.FormRow rowForm = this.InnerDS.Form[0];
        FormPersonalReimburseTableAdapter taFormTravelReimburse = new FormPersonalReimburseTableAdapter();

        taFormTravelReimburse.FillByID(this.InnerDS.FormPersonalReimburse, formID);
        FormDS.FormPersonalReimburseRow rowFormTravelReimburse = this.InnerDS.FormPersonalReimburse[0];
        this.ViewState["FormTravelApplyID"] = rowFormTravelReimburse.FormTravelApplyID;
        //赋值
        this.PeriodDDL.DataSourceID = "odsPeriod";
        this.PeriodDDL.DataBind();
        ListItem item = this.PeriodDDL.Items.FindByText(rowFormTravelReimburse.Period.ToString("yyyy-MM"));

        if (item != null)
        {
            this.PeriodDDL.SelectedValue = item.Value;
        }
        if (!rowFormTravelReimburse.IsRemarkNull())
        {
            this.RemarkCtl.Text = rowFormTravelReimburse.Remark;
        }
        if (!rowFormTravelReimburse.IsAttachedFileNameNull())
        {
            this.UCFileUpload.AttachmentFileName = rowFormTravelReimburse.AttachedFileName;
        }
        if (!rowFormTravelReimburse.IsRealAttachedFileNameNull())
        {
            this.UCFileUpload.RealAttachmentFileName = rowFormTravelReimburse.RealAttachedFileName;
        }

        OpenTravelApplyForm(rowFormTravelReimburse.FormTravelApplyID);
        // 打开明细表
        FormPersonalReimburseDetailTableAdapter taDetail = new FormPersonalReimburseDetailTableAdapter();

        taDetail.FillByFormID(this.InnerDS.FormPersonalReimburseDetail, formID);
    }
    protected void OpenForm(int formID)
    {
        FormTableAdapter taForm = new FormTableAdapter();
        taForm.FillByID(this.InnerDS.Form, formID);
        FormDS.FormRow rowForm = this.InnerDS.Form[0];
        FormPersonalReimburseTableAdapter taFormTravelReimburse = new FormPersonalReimburseTableAdapter();
        taFormTravelReimburse.FillByID(this.InnerDS.FormPersonalReimburse, formID);
        FormDS.FormPersonalReimburseRow rowFormTravelReimburse = this.InnerDS.FormPersonalReimburse[0];
        this.ViewState["FormTravelApplyID"] = rowFormTravelReimburse.FormTravelApplyID;
        //��ֵ
        this.PeriodDDL.DataSourceID = "odsPeriod";
        this.PeriodDDL.DataBind();
        ListItem item = this.PeriodDDL.Items.FindByText(rowFormTravelReimburse.Period.ToString("yyyy-MM"));
        if (item != null) {
            this.PeriodDDL.SelectedValue = item.Value;
        }
        if (!rowFormTravelReimburse.IsRemarkNull()) {
            this.RemarkCtl.Text = rowFormTravelReimburse.Remark;
        }
        if (!rowFormTravelReimburse.IsAttachedFileNameNull()) {
            this.UCFileUpload.AttachmentFileName = rowFormTravelReimburse.AttachedFileName;
        }
        if (!rowFormTravelReimburse.IsRealAttachedFileNameNull()) {
            this.UCFileUpload.RealAttachmentFileName = rowFormTravelReimburse.RealAttachedFileName;
        }

        OpenTravelApplyForm(rowFormTravelReimburse.FormTravelApplyID);
        // ����ϸ��
        FormPersonalReimburseDetailTableAdapter taDetail = new FormPersonalReimburseDetailTableAdapter();
        taDetail.FillByFormID(this.InnerDS.FormPersonalReimburseDetail, formID);
    }