Ejemplo n.º 1
0
    protected void btnSavePaymentInfo_Click(object sender, EventArgs e)
    {
        DateTime PaymentDate   = DateTime.MinValue;
        decimal  PaymentAmount = decimal.Zero;

        if (!string.IsNullOrEmpty(ucPaymentDate.SelectedDate))
        {
            DateTime.TryParse(ucPaymentDate.SelectedDate, out PaymentDate);
        }
        if (PaymentDate == DateTime.MinValue)
        {
            PageUtility.ShowModelDlg(this, "支付日期填写不正确!");
            return;
        }
        try {
            SalesReimburseBLL.UpdateFormReimburseForRealPaymentInfo(int.Parse(this.ViewState["ObjectId"].ToString()), PaymentDate);
        } catch (Exception) {
            PageUtility.ShowModelDlg(this, e.ToString());
            throw;
        }
        if (this.Request["Source"] != null)
        {
            this.Response.Redirect(this.Request["Source"].ToString());
        }
        else
        {
            this.Response.Redirect("~/Home.aspx");
        }
    }