예제 #1
0
        /// <summary>
        /// 根据单据ID加载收款单据数据
        /// </summary>
        /// <param name="id"></param>
        private void LoadCollecting(int id)
        {
            To_Collecting collectingModel = To_CollectingManager.getTo_CollectingById(id);

            if (collectingModel == null)
            {
                form1.InnerHtml = "<p style='font-size:14px;'>单据不存在,可能已被删除!<br /><a href='CollectingList.aspx'>返回单据列表</a></p>";
                return;
            }

            LblMakeDate.Text       = collectingModel.MarkDate.ToShortDateString();
            LblMakeDepartment.Text = collectingModel.MarkerDepartment;
            LblPayBank.Text        = collectingModel.PayBank;
            LblPayBankAcount.Text  = collectingModel.PayBankAcount;
            LblPaymentUnit.Text    = collectingModel.PaymentUnit;
            LblReceiptAmount.Text  = collectingModel.ReceiptAmount.ToString("N2");
            LblReceiptDate.Text    = collectingModel.ReceiptDate.ToShortDateString();
            LtrMark.Text           = collectingModel.ReceiptMark;
            LblReceiptNum.Text     = collectingModel.ReceiptNum;
            LtrConfirm.Text        = collectingModel.ConfirmReceipt == 1 ? "已确认" : "<font color='red'>未确认</font>";
            LblMaker.Text          = collectingModel.Marker;

            //如果已经确认那么显示确认信息
            if (collectingModel.ConfirmReceipt == 1)
            {
                confirm.Visible = true;
                DataTable dt = To_CollectingManager.getConfirmInfo(id.ToString());
                if (dt.Rows.Count > 0)
                {
                    this.lblConfirmMan.Text  = dt.Rows[0]["confirmMan"].ToString();
                    this.lblConfirmDate.Text = dt.Rows[0]["confirmDate"].ToString();
                }
            }

            switch (collectingModel.PaymentMode)
            {
            case 0:
                LblPaymentMode.Text = "现金";
                break;

            case 1:
                LblPaymentMode.Text = "转账";
                break;

            case 2:
                LblPaymentMode.Text = "网银";
                break;

            default:
                LblPaymentMode.Text = "未知";
                break;
            }

            LblBusinessUnit.Text = collectingModel.BusinessUnit;

            if (collectingModel.PaymentMode != 0)
            {
                paymentInfo.Visible = true;
            }
            else
            {
                paymentInfo.Visible = false;
            }

            LoadClaimDetail(id);
        }