public SqlParameter[] DealwithCrimeCount=new SqlParameter[28];
public void GetDealwithCrimCount(DateTime timeStart, DateTime timeEnd)
{
{
DealwithCrimeCount[0] = new SqlParameter("@DealwithCrimeCount1",SqlDbType.Int,4);
DealwithCrimeCount[1] = new SqlParameter("@DealwithCrimeCount2", SqlDbType.Int, 4);
DealwithCrimeCount[2] = new SqlParameter("@DealwithCrimeCount3", SqlDbType.Int, 4);
};
DealwithCrimeCount[0].Direction = ParameterDirection.Output; //为存储过程的输出参数 DealwithCrimeCount[1].Direction = ParameterDirection.Output;
DealwithCrimeCount[2].Direction = ParameterDirection.Output; DataSet ds = this.dbProcessor.RunProcedure("Cup_Work_GetDealwithCrimecount", DealwithCrimeCount, "GetDealwithCrimeCount");
DataTable dt = ds.Tables["GetDealwithCrimeCount"];}DataTable dt = new DataTable();
dt1.Columns.Add(new DataColumn("核对方法",typeof(string)));
dt1.Columns.Add(new DataColumn("上月未结",typeof(int)));
dt1.Columns.Add(new DataColumn("小计",typeof(int)));
dt1.Rows.Add(new object[] { "合计", GetAll(), 0, GetArrestcount(), -1, 0, 0, 0, 0, 0 });
dt1.Rows.Add(new object[] { "逮捕", GetAllArrest(), 0, 0, -1, -1, 0, 0, 0, 0, 0 });
dt1.Rows.Add(new object[] { "刑事拘留", GetAllCustoy(), 0, Convert.ToInt32(DealwithCrimeCount[2].Value), -1, -1});
dt1.Rows.Add(new object[] { "取保候审", GetAllBail(), 0, Convert.ToInt32(DealwithCrimeCount[3].Value), -1, });
dt1.Rows.Add(new object[] { "监视居住", GetAllScountHouse(), 0, Convert.ToInt32(DealwithCrimeCount[4].Value),
出现未将对象引用设置到对象的实例。什么原因啊??望指教~~
public void GetDealwithCrimCount(DateTime timeStart, DateTime timeEnd)
{
{
DealwithCrimeCount[0] = new SqlParameter("@DealwithCrimeCount1",SqlDbType.Int,4);
DealwithCrimeCount[1] = new SqlParameter("@DealwithCrimeCount2", SqlDbType.Int, 4);
DealwithCrimeCount[2] = new SqlParameter("@DealwithCrimeCount3", SqlDbType.Int, 4);
};
DealwithCrimeCount[0].Direction = ParameterDirection.Output; //为存储过程的输出参数 DealwithCrimeCount[1].Direction = ParameterDirection.Output;
DealwithCrimeCount[2].Direction = ParameterDirection.Output; DataSet ds = this.dbProcessor.RunProcedure("Cup_Work_GetDealwithCrimecount", DealwithCrimeCount, "GetDealwithCrimeCount");
DataTable dt = ds.Tables["GetDealwithCrimeCount"];}DataTable dt = new DataTable();
dt1.Columns.Add(new DataColumn("核对方法",typeof(string)));
dt1.Columns.Add(new DataColumn("上月未结",typeof(int)));
dt1.Columns.Add(new DataColumn("小计",typeof(int)));
dt1.Rows.Add(new object[] { "合计", GetAll(), 0, GetArrestcount(), -1, 0, 0, 0, 0, 0 });
dt1.Rows.Add(new object[] { "逮捕", GetAllArrest(), 0, 0, -1, -1, 0, 0, 0, 0, 0 });
dt1.Rows.Add(new object[] { "刑事拘留", GetAllCustoy(), 0, Convert.ToInt32(DealwithCrimeCount[2].Value), -1, -1});
dt1.Rows.Add(new object[] { "取保候审", GetAllBail(), 0, Convert.ToInt32(DealwithCrimeCount[3].Value), -1, });
dt1.Rows.Add(new object[] { "监视居住", GetAllScountHouse(), 0, Convert.ToInt32(DealwithCrimeCount[4].Value),
出现未将对象引用设置到对象的实例。什么原因啊??望指教~~
DataSet ds = this.dbProcessor.RunProcedure("Cup_Work_GetDealwithCrimecount", DealwithCrimeCount, "GetDealwithCrimeCount");
DataTable dt = ds.Tables["GetDealwithCrimeCount"];