本文介绍了exe切割我的asp.nt网页时发生错误。(无法找到表格)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

public List<holidayreg> FillHolidayData(RequestResponse request)
{
   List<holidayreg> ListHoliday = new List<holidayreg>();
   DataSet ds = null;
   try
   {
      if (ds == null)
      {
         ds = new DataSet();
         SqlParameter[] inputPara = new SqlParameter[2];
         inputPara[0] = new SqlParameter(BALResource.PayrollResources.HolidayID, request.HollidayReg.HolidayID);
         inputPara[1] = new SqlParameter(BALResource.PayrollResources.Mode, request.HollidayReg.Mode);
         ds = LoadGridData(BALResource.PayrollResources.ProcedueHolidaySelectDelete, inputPara);
         DataTable dt = ds.Tables[0];
         HolidayReg objHoliday = new HolidayReg();
         for (int row = 0; row < dt.Rows.Count; row++)
         {
            objHoliday = new HolidayReg();
            foreach (DataColumn dc in dt.Columns)
            {
               foreach (PropertyInfo prop in objHoliday.GetType().GetProperties())
               {
                  if (prop.Name == dc.ColumnName && prop.CanWrite)
                  {
                     if (dt.Rows[row][dc.ColumnName] != DBNull.Value)
                     {
                        prop.SetValue(objHoliday, dt.Rows[row][dc.ColumnName], null);
                     }
                  }
               }
            }
            ListHoliday.Add(objHoliday);
         }
      }
   }
   catch (Exception ex)
   {
      throw ex;
   }
   return ListHoliday;
}

推荐答案

ds = LoadGridData(BALResource.PayrollResources.ProcedueHolidaySelectDelete, inputPara);



然后跳转到:


then jump to:

DataTable dt = ds.Tables[0];



我确定你的函数没有返回任何数据。检查一下。


I am sure your function is not returning any data. Check it.


这篇关于exe切割我的asp.nt网页时发生错误。(无法找到表格)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-28 13:01