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);
        }
Example #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));
        }
        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;
        }
Example #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);
        }