public DataSet SelectAll(AdditionalService additionalService)
        {
            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_AdditionalServiceSelectAll");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, additionalService.CompanyId);

            return db.ExecuteDataSet(dbCommand);
        }
        public DataSet SelectAll(AdditionalService additionalService)
        {
            Database  db        = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_AdditionalServiceSelectAll");

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

            return(db.ExecuteDataSet(dbCommand));
        }
        public bool IsDuplicateServiceCode(AdditionalService additionalService)
        {
            bool result = false;

            Database db = DatabaseFactory.CreateDatabase(Constants.HBMCONNECTIONSTRING);
            DbCommand dbCommand = db.GetStoredProcCommand("usp_AdditionalServiceIsDuplicateTypeName");
            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, additionalService.CompanyId);
            db.AddInParameter(dbCommand, "@AdditionalServiceId", DbType.Int32, additionalService.AdditionalServiceId);
            db.AddInParameter(dbCommand, "@ServiceCode", DbType.String, additionalService.ServiceCode);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

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

            return result;
        }
        public bool IsDuplicateServiceCode(AdditionalService additionalService)
        {
            bool result = false;

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

            db.AddInParameter(dbCommand, "@CompanyId", DbType.Int32, additionalService.CompanyId);
            db.AddInParameter(dbCommand, "@AdditionalServiceId", DbType.Int32, additionalService.AdditionalServiceId);
            db.AddInParameter(dbCommand, "@ServiceCode", DbType.String, additionalService.ServiceCode);
            db.AddOutParameter(dbCommand, "@IsExist", DbType.Boolean, 1);

            db.ExecuteNonQuery(dbCommand);

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


            return(result);
        }