コード例 #1
0
        public DataSet SelectAll(CreditCardType creditCardType)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_CreditCardTypeSelectAll");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, creditCardType.CompanyId);

            return db.ExecuteDataSet(dbCommand);
        }
コード例 #2
0
        public DataSet SelectAll(CreditCardType creditCardType)
        {
            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_CreditCardTypeSelectAll");

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, creditCardType.CompanyId);

            return(db.ExecuteDataSet(dbCommand));
        }
コード例 #3
0
        public bool IsDuplicateTypeName(CreditCardType creditCardType)
        {
            bool result = false;

            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_CreditCardTypeIsDuplicateTypeName");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, creditCardType.CompanyId);
            db.AddInParameter(dbCommand, "@CreditCardTypeId", DbType.Int32, creditCardType.CreditCardTypeId);
            db.AddInParameter(dbCommand, "@Name", DbType.String, creditCardType.Name);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

            result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString());

            return result;
        }
コード例 #4
0
        public bool IsDuplicateTypeName(CreditCardType creditCardType)
        {
            bool result = false;

            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_CreditCardTypeIsDuplicateTypeName");

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, creditCardType.CompanyId);
            db.AddInParameter(dbCommand, "@CreditCardTypeId", DbType.Int32, creditCardType.CreditCardTypeId);
            db.AddInParameter(dbCommand, "@Name", DbType.String, creditCardType.Name);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

            result = Convert.ToBoolean(db.GetParameterValue(dbCommand, "@IsExist").ToString());


            return(result);
        }