Exemplo n.º 1
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        string PaymentID = Request.QueryString["KeyID"];

        this.PaymentID.Value = PaymentID;
        if (!string.IsNullOrWhiteSpace(PaymentID))
        {
            Hi.Model.YZT_Payment paymentModel = new Hi.BLL.YZT_Payment().GetModel(Convert.ToInt32(PaymentID));
            if (paymentModel != null)
            {
                if (paymentModel.IState == 1)
                {
                    btnUpdate.Visible = false;
                    auditBtn.Visible  = false;
                }
                this.PaymentNO.Value     = paymentModel.PaymentNO;
                this.PaymentDate.Value   = paymentModel.PaymentDate.ToString("yyyy-MM-dd");
                this.IState.Value        = paymentModel.IState.ToString();
                this.PaymentAmount.Value = paymentModel.PaymentAmount.ToString("#0.00");
                this.Remark.Value        = paymentModel.Remark.ToString();
                this.HtDrop.Value        = paymentModel.hospital;
            }

            List <Hi.Model.YZT_PaymentDetail> libraryDetailList = new Hi.BLL.YZT_PaymentDetail().GetList("", " dr=0 and PaymentID=" + PaymentID + "", "");
            Rep_StorageDetail.DataSource = libraryDetailList;
            Rep_StorageDetail.DataBind();
            if (libraryDetailList.Count > 0)
            {
                oneTR.Visible = false;
            }
        }
    }
Exemplo n.º 2
0
    /// <summary>
    /// 绑定数据
    /// </summary>
    public void Bind()
    {
        DataTable ht = new Hi.BLL.YZT_Library().getHtDrop(DisID.ToString());

        this.HtDrop.DataSource     = ht;
        this.HtDrop.DataTextField  = "hospital";
        this.HtDrop.DataValueField = "hospital";
        this.HtDrop.DataBind();

        string PaymentID = Request.QueryString["KeyID"];

        this.PaymentID.Value = PaymentID;
        if (!string.IsNullOrWhiteSpace(PaymentID))
        {
            Hi.Model.YZT_Payment paymentModel = new Hi.BLL.YZT_Payment().GetModel(Convert.ToInt32(PaymentID));
            if (paymentModel != null)
            {
                this.PaymentNO.Value      = paymentModel.PaymentNO;
                this.PaymentDate.Value    = paymentModel.PaymentDate.ToString("yyyy-MM-dd");
                this.IState.Value         = paymentModel.IState.ToString();
                this.PaymentAmount.Value  = paymentModel.PaymentAmount.ToString("#0.00");
                this.Remark.Value         = paymentModel.Remark.ToString();
                this.HtDrop.SelectedValue = paymentModel.hospital.ToString();
                this.HtDrop.Enabled       = false;
            }

            List <Hi.Model.YZT_PaymentDetail> libraryDetailList = new Hi.BLL.YZT_PaymentDetail().GetList("", " dr=0 and PaymentID=" + PaymentID + "", "");
            Rep_StorageDetail.DataSource = libraryDetailList;
            Rep_StorageDetail.DataBind();
            if (libraryDetailList.Count > 0)
            {
                oneTR.Visible = false;
            }
        }
    }