//public static DataSet GetDatasetUsingProcedure(string OstoredProcName, DBParams OparameterValues) //{ // MasterDal oDal = new MasterDal(); // DataSet oDS = oDal.ExecuteDataSet(OstoredProcName,OparameterValues); // oDal.Dispose(); // oDal = null; // return oDS; //} public static DataSet GetDataset(String SQL) { MasterDal oDal = new MasterDal(); DataSet oDS = oDal.ExecuteDataSet(SQL); oDal.Dispose(); oDal = null; return(oDS); }
public static Resultset <DataSet> GetDataSetWithStoreprocedure(String strStoreProceureName, DBParams dbpParameterName) { MasterDal oDal = new MasterDal(); Resultset <DataSet> oDStore = oDal.ExecuteDataSet(strStoreProceureName, dbpParameterName); oDal.Dispose(); oDal = null; return(oDStore); }
public static void ExceteQueryWithStoreprocedure(String strStoreProceureName, DBParams dbpParameterName) { MasterDal oDal = new MasterDal(); oDal.ExecuteNonQuery(strStoreProceureName, dbpParameterName); oDal.Dispose(); oDal = null; //return oDStore; }
public static object GetScalar(string SQL) { MasterDal oDal = new MasterDal(); object obj = oDal.ExecuteScalar(SQL); oDal.Dispose(); oDal = null; return(obj); }
public static SqlDataReader GetDataReader(String SQL) { MasterDal oDal = new MasterDal(); SqlDataReader oDR = oDal.ExecuteDataReader(SQL); oDal.Dispose(); oDal = null; return(oDR); }
public static bool ExecuteQuery(string SQL) { MasterDal oDal = new MasterDal(); int intRet = oDal.ExecuteNonQuery(SQL); oDal.Dispose(); oDal = null; if (intRet >= 0) { //DSExceptions.Messages.Add("", "Data saved", ExceptionType.Information); return(true); } else { //DSExceptions.Messages.Add("", "Some error occured to ExecuteQuery", ExceptionType.Information); return(false); } }
public static long ExecuteQuery(string SQL, bool IsPKID) { MasterDal oDal = new MasterDal(); long intRet = oDal.ExecuteNonQuery(SQL); if (IsPKID == true && (int)intRet > 0 && SQL.ToUpper().IndexOf("INSERT ") >= 0) { intRet = Convert.ToInt32(oDal.ExecuteScalar("Select SCOPE_IDENTITY()")); } oDal.Dispose(); oDal = null; if (intRet >= 0) { //DSExceptions.Messages.Add("", "Data saved", ExceptionType.Information); return(intRet); } else { //DSExceptions.Messages.Add("", "Some error occured to ExecuteQuery", ExceptionType.Information); return(intRet); } }