コード例 #1
0
        public static void ExceteQueryWithStoreprocedure(String strStoreProceureName, DBParams dbpParameterName)
        {
            MasterDal oDal = new MasterDal();

            oDal.ExecuteNonQuery(strStoreProceureName, dbpParameterName);
            oDal.Dispose();
            oDal = null;
            //return oDStore;
        }
コード例 #2
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);
            }
        }
コード例 #3
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);
            }
        }