using System; using System.Collections; using System.Configuration; using System.Data; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.HtmlControls; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using DSWeb.Models; using DSWeb.EntityDA; using System.Text; namespace DSWeb.Settlements { public partial class PaySettleApplicationEdit : System.Web.UI.Page { private string strPaySettlementAppID;//付费申请GID private string strRunSettleID;//运行结算表GID private string strCheckType;//查看类型 protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["id"] != null) { strPaySettlementAppID = Request.QueryString["id"].ToString(); h_paysettleappid.Value = strPaySettlementAppID; } if (Request.QueryString["runsettleid"] != null) { strRunSettleID = Request.QueryString["runsettleid"].ToString(); h_runsettleid.Value = strRunSettleID; } if (Request.QueryString["checktype"] != null) { strCheckType = Request.QueryString["checktype"].ToString().Trim(); h_checktype.Value = strCheckType; } if (strCheckType == "1") { if (strRunSettleID != null) { GetRunSettleApplicationInfo(strRunSettleID); } } else { if (strPaySettlementAppID != null) { GetPaySettlementApplicationInfo(strPaySettlementAppID); } } } private void GetRunSettleApplicationInfo(string tempRunSettleID) { RunFeeSettlementEntity runFeeSettlementEntity = new RunFeeSettlementDA().GetRunFeeSettlementByGID(tempRunSettleID); if (runFeeSettlementEntity.GID != null) { this.txt_billno.Value = ""; this.h_billno.Value = ""; this.h_customer.Value = runFeeSettlementEntity.CustomerName; this.h_settletype.Value = runFeeSettlementEntity.SettleType.ToString(); this.txt_chequepayable.Value = runFeeSettlementEntity.ChequeNo; UserEntity userEntity = new UserEntity(); UserDA userDA = new UserDA(); userEntity = userDA.GetUserSignByID(runFeeSettlementEntity.CreateUser); if (userEntity.Gid != null) { this.txt_applyuser.Value = userEntity.ShowName; } this.txt_applytime.Value = runFeeSettlementEntity.CreateTime.ToString(); this.txt_remark.Value = runFeeSettlementEntity.Remark; this.txt_rmb.Value = runFeeSettlementEntity.AmountRMB.ToString(); this.txt_usd.Value = runFeeSettlementEntity.AmountUSD.ToString(); this.txt_payabletime.Value = runFeeSettlementEntity.PayableTime == DateTime.MinValue ? "" : runFeeSettlementEntity.PayableTime.ToString(); this.txtCHEQUENUMREMARK.Text = runFeeSettlementEntity.CHEQUENUMREMARK==null?"":runFeeSettlementEntity.CHEQUENUMREMARK.ToString();//支票号备注 } } private void GetPaySettlementApplicationInfo(string tempPaySettlementAppID) { FeePayApplicationEntity feePayApplicationEntity = new FeePaySettleApplicationDA().GetFeePayApplicationByGID(tempPaySettlementAppID); if (feePayApplicationEntity.GID != null) { this.txt_billno.Value = feePayApplicationEntity.BillNO; this.h_billno.Value = feePayApplicationEntity.BillNO; this.h_customer.Value = feePayApplicationEntity.CustomerName; this.h_settletype.Value = feePayApplicationEntity.SettleType.ToString(); this.txt_chequepayable.Value = feePayApplicationEntity.ChequePayable; UserEntity userEntity = new UserEntity(); UserDA userDA = new UserDA(); userEntity = userDA.GetUserSignByID(feePayApplicationEntity.Applicant); if (userEntity.Gid != null) { this.txt_applyuser.Value = userEntity.ShowName; } this.txt_applytime.Value = feePayApplicationEntity.ApplyTime.ToString(); this.txt_remark.Value = feePayApplicationEntity.Remark; this.txt_rmb.Value = feePayApplicationEntity.AmountRMB.ToString(); this.txt_usd.Value = feePayApplicationEntity.AmountUSD.ToString(); this.txt_payabletime.Value = feePayApplicationEntity.PayableTime == DateTime.MinValue ? "" : feePayApplicationEntity.PayableTime.ToString(); this.txtCHEQUENUMREMARK.Text = feePayApplicationEntity.CHEQUENUMREMARK == null ? "" : feePayApplicationEntity.CHEQUENUMREMARK.ToString() ;//支票号备注 } } } }