示例#1
0
        //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);
        }
示例#2
0
        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);
        }
示例#3
0
        public static void ExceteQueryWithStoreprocedure(String strStoreProceureName, DBParams dbpParameterName)
        {
            MasterDal oDal = new MasterDal();

            oDal.ExecuteNonQuery(strStoreProceureName, dbpParameterName);
            oDal.Dispose();
            oDal = null;
            //return oDStore;
        }
示例#4
0
        public static object GetScalar(string SQL)
        {
            MasterDal oDal = new MasterDal();
            object    obj  = oDal.ExecuteScalar(SQL);

            oDal.Dispose();
            oDal = null;
            return(obj);
        }
示例#5
0
        public static SqlDataReader GetDataReader(String SQL)
        {
            MasterDal     oDal = new MasterDal();
            SqlDataReader oDR  = oDal.ExecuteDataReader(SQL);

            oDal.Dispose();
            oDal = null;
            return(oDR);
        }
示例#6
0
        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);
            }
        }
示例#7
0
        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);
            }
        }