string Businessdate= Convert.ToString(Context.Current.FormDataSet["Dailyfundreport.Businessdate"]);
string Unit= Convert.ToString(Context.Current.FormDataSet["Dailyfundreport.Unit"]);
string Totalbankpay= Convert.ToString(Context.Current.FormDataSet["Dailyfundreport.Totalbankpay"]);
string Totalbillpay= Convert.ToString(Context.Current.FormDataSet["Dailyfundreport.Totalbillpay"]);
string Totalcashpay= Convert.ToString(Context.Current.FormDataSet["Dailyfundreport.Totalcashpay"]);
string sql3="select b.rmb1 from (select case when c.rmb1 is null then '0.00' else c.rmb1 end rmb1 from (select sum(RMB) rmb1 from Expenditure where Verifydate='"+Businessdate+"' and Expendunit='"+Unit+"' and Settletype = 3) c) b where b. rmb1='"+Totalcashpay+"' ";
IDataReader reader3=DataSourceManager.ExecuteReader("BPMJB",sql3);
if(!reader3.Read()){
throw new Exception("现金支出金额合计与支出审批单合计不符!");
}
reader3.Close();