namespace DAL
{
public class DatabaseService
{
Database dal;
string query;
DataSet ds = new DataSet();
DbCommand cmd;
public DateTime GetCurrentDateTime()
{
dal = DatabaseFactory.CreateDatabase("ConnStr");
query = "uspStoreProdure1";
cmd = dal.GetStoredProcCommand(query);
return Convert.ToDateTime(dal.ExecuteDataSet(cmd).Tables[0].Rows[0]["CurrentDateTime"]);
}
public DateTime GetCurrentDateTime1()
{
dal = DatabaseFactory.CreateDatabase("ConnStr");
query = "uspStoreProdure2";
cmd = dal.GetStoredProcCommand(query);
ds = dal.ExecuteDataSet(cmd);
return Convert.ToInt32(ds.Tables[0].Rows[0][0].ToString());
}
// n number of method
}
答案 0 :(得分:0)
遗漏了真正的问题,但可能是以下内容: