예제 #1
0
        public DataSet SelectAll(TaxType taxType)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_TaxTypeSelectAll");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, taxType.CompanyId);

            return db.ExecuteDataSet(dbCommand);
        }
예제 #2
0
        public DataSet SelectAll(TaxType taxType)
        {
            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_TaxTypeSelectAll");

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

            return(db.ExecuteDataSet(dbCommand));
        }
예제 #3
0
        public bool IsDuplicateTypeName(TaxType taxType)
        {
            bool result = false;

            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_TaxTypeIsDuplicateTypeName");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, taxType.CompanyId);
            db.AddInParameter(dbCommand, "@TaxTypeId", DbType.Int32, taxType.TaxTypeId);
            db.AddInParameter(dbCommand, "@TaxTypeName", DbType.String, taxType.TaxTypeName);
            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(TaxType taxType)
        {
            bool result = false;

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

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, taxType.CompanyId);
            db.AddInParameter(dbCommand, "@TaxTypeId", DbType.Int32, taxType.TaxTypeId);
            db.AddInParameter(dbCommand, "@TaxTypeName", DbType.String, taxType.TaxTypeName);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

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


            return(result);
        }